Home | History | Annotate | Download | only in common
      1 //
      2 // Copyright (C) 2013 The Android Open Source Project
      3 //
      4 // Licensed under the Apache License, Version 2.0 (the "License");
      5 // you may not use this file except in compliance with the License.
      6 // You may obtain a copy of the License at
      7 //
      8 //      http://www.apache.org/licenses/LICENSE-2.0
      9 //
     10 // Unless required by applicable law or agreed to in writing, software
     11 // distributed under the License is distributed on an "AS IS" BASIS,
     12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 // See the License for the specific language governing permissions and
     14 // limitations under the License.
     15 //
     16 
     17 #include "update_engine/common/constants.h"
     18 
     19 namespace chromeos_update_engine {
     20 
     21 const char kPowerwashSafePrefsSubDirectory[] = "update_engine/prefs";
     22 
     23 const char kPrefsSubDirectory[] = "prefs";
     24 
     25 const char kStatefulPartition[] = "/mnt/stateful_partition";
     26 
     27 const char kPostinstallDefaultScript[] = "postinst";
     28 
     29 // Constants defining keys for the persisted state of update engine.
     30 const char kPrefsAttemptInProgress[] = "attempt-in-progress";
     31 const char kPrefsBackoffExpiryTime[] = "backoff-expiry-time";
     32 const char kPrefsBootId[] = "boot-id";
     33 const char kPrefsCurrentBytesDownloaded[] = "current-bytes-downloaded";
     34 const char kPrefsCurrentResponseSignature[] = "current-response-signature";
     35 const char kPrefsCurrentUrlFailureCount[] = "current-url-failure-count";
     36 const char kPrefsCurrentUrlIndex[] = "current-url-index";
     37 const char kPrefsDailyMetricsLastReportedAt[] =
     38     "daily-metrics-last-reported-at";
     39 const char kPrefsDeltaUpdateFailures[] = "delta-update-failures";
     40 const char kPrefsFullPayloadAttemptNumber[] = "full-payload-attempt-number";
     41 const char kPrefsInstallDateDays[] = "install-date-days";
     42 const char kPrefsLastActivePingDay[] = "last-active-ping-day";
     43 const char kPrefsLastRollCallPingDay[] = "last-roll-call-ping-day";
     44 const char kPrefsManifestMetadataSize[] = "manifest-metadata-size";
     45 const char kPrefsManifestSignatureSize[] = "manifest-signature-size";
     46 const char kPrefsMetricsAttemptLastReportingTime[] =
     47     "metrics-attempt-last-reporting-time";
     48 const char kPrefsMetricsCheckLastReportingTime[] =
     49     "metrics-check-last-reporting-time";
     50 const char kPrefsNumReboots[] = "num-reboots";
     51 const char kPrefsNumResponsesSeen[] = "num-responses-seen";
     52 const char kPrefsOmahaCohort[] = "omaha-cohort";
     53 const char kPrefsOmahaCohortHint[] = "omaha-cohort-hint";
     54 const char kPrefsOmahaCohortName[] = "omaha-cohort-name";
     55 const char kPrefsP2PEnabled[] = "p2p-enabled";
     56 const char kPrefsP2PFirstAttemptTimestamp[] = "p2p-first-attempt-timestamp";
     57 const char kPrefsP2PNumAttempts[] = "p2p-num-attempts";
     58 const char kPrefsPayloadAttemptNumber[] = "payload-attempt-number";
     59 const char kPrefsPreviousVersion[] = "previous-version";
     60 const char kPrefsResumedUpdateFailures[] = "resumed-update-failures";
     61 const char kPrefsRollbackVersion[] = "rollback-version";
     62 const char kPrefsChannelOnSlotPrefix[] = "channel-on-slot-";
     63 const char kPrefsSystemUpdatedMarker[] = "system-updated-marker";
     64 const char kPrefsTargetVersionAttempt[] = "target-version-attempt";
     65 const char kPrefsTargetVersionInstalledFrom[] = "target-version-installed-from";
     66 const char kPrefsTargetVersionUniqueId[] = "target-version-unique-id";
     67 const char kPrefsTotalBytesDownloaded[] = "total-bytes-downloaded";
     68 const char kPrefsUpdateCheckCount[] = "update-check-count";
     69 const char kPrefsUpdateCheckResponseHash[] = "update-check-response-hash";
     70 const char kPrefsUpdateCompletedBootTime[] = "update-completed-boot-time";
     71 const char kPrefsUpdateCompletedOnBootId[] = "update-completed-on-boot-id";
     72 const char kPrefsUpdateDurationUptime[] = "update-duration-uptime";
     73 const char kPrefsUpdateFirstSeenAt[] = "update-first-seen-at";
     74 const char kPrefsUpdateOverCellularPermission[] =
     75     "update-over-cellular-permission";
     76 const char kPrefsUpdateServerCertificate[] = "update-server-cert";
     77 const char kPrefsUpdateStateNextDataLength[] = "update-state-next-data-length";
     78 const char kPrefsUpdateStateNextDataOffset[] = "update-state-next-data-offset";
     79 const char kPrefsUpdateStateNextOperation[] = "update-state-next-operation";
     80 const char kPrefsUpdateStateSHA256Context[] = "update-state-sha-256-context";
     81 const char kPrefsUpdateStateSignatureBlob[] = "update-state-signature-blob";
     82 const char kPrefsUpdateStateSignedSHA256Context[] =
     83     "update-state-signed-sha-256-context";
     84 const char kPrefsUpdateTimestampStart[] = "update-timestamp-start";
     85 const char kPrefsUrlSwitchCount[] = "url-switch-count";
     86 const char kPrefsWallClockWaitPeriod[] = "wall-clock-wait-period";
     87 
     88 const char kPayloadPropertyFileSize[] = "FILE_SIZE";
     89 const char kPayloadPropertyFileHash[] = "FILE_HASH";
     90 const char kPayloadPropertyMetadataSize[] = "METADATA_SIZE";
     91 const char kPayloadPropertyMetadataHash[] = "METADATA_HASH";
     92 const char kPayloadPropertyAuthorization[] = "AUTHORIZATION";
     93 const char kPayloadPropertyUserAgent[] = "USER_AGENT";
     94 const char kPayloadPropertyPowerwash[] = "POWERWASH";
     95 const char kPayloadPropertyNetworkId[] = "NETWORK_ID";
     96 
     97 }  // namespace chromeos_update_engine
     98