123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- #ifndef UPDATE_ENGINE_COMMON_CONSTANTS_H_
- #define UPDATE_ENGINE_COMMON_CONSTANTS_H_
- namespace chromeos_update_engine {
- extern const char kPowerwashSafePrefsSubDirectory[];
- extern const char kPrefsSubDirectory[];
- extern const char kPostinstallDefaultScript[];
- extern const char kStatefulPartition[];
- extern const char kPrefsAttemptInProgress[];
- extern const char kPrefsBackoffExpiryTime[];
- extern const char kPrefsBootId[];
- extern const char kPrefsCurrentBytesDownloaded[];
- extern const char kPrefsCurrentResponseSignature[];
- extern const char kPrefsCurrentUrlFailureCount[];
- extern const char kPrefsCurrentUrlIndex[];
- extern const char kPrefsDailyMetricsLastReportedAt[];
- extern const char kPrefsDeltaUpdateFailures[];
- extern const char kPrefsDynamicPartitionMetadataUpdated[];
- extern const char kPrefsFullPayloadAttemptNumber[];
- extern const char kPrefsInstallDateDays[];
- extern const char kPrefsLastActivePingDay[];
- extern const char kPrefsLastRollCallPingDay[];
- extern const char kPrefsManifestMetadataSize[];
- extern const char kPrefsManifestSignatureSize[];
- extern const char kPrefsMetricsAttemptLastReportingTime[];
- extern const char kPrefsMetricsCheckLastReportingTime[];
- extern const char kPrefsNoIgnoreBackoff[];
- extern const char kPrefsNumReboots[];
- extern const char kPrefsNumResponsesSeen[];
- extern const char kPrefsOmahaCohort[];
- extern const char kPrefsOmahaCohortHint[];
- extern const char kPrefsOmahaCohortName[];
- extern const char kPrefsOmahaEolStatus[];
- extern const char kPrefsP2PEnabled[];
- extern const char kPrefsP2PFirstAttemptTimestamp[];
- extern const char kPrefsP2PNumAttempts[];
- extern const char kPrefsPayloadAttemptNumber[];
- extern const char kPrefsPostInstallSucceeded[];
- extern const char kPrefsPreviousVersion[];
- extern const char kPrefsResumedUpdateFailures[];
- extern const char kPrefsRollbackHappened[];
- extern const char kPrefsRollbackVersion[];
- extern const char kPrefsChannelOnSlotPrefix[];
- extern const char kPrefsSystemUpdatedMarker[];
- extern const char kPrefsTargetVersionAttempt[];
- extern const char kPrefsTargetVersionInstalledFrom[];
- extern const char kPrefsTargetVersionUniqueId[];
- extern const char kPrefsTotalBytesDownloaded[];
- extern const char kPrefsUpdateCheckCount[];
- extern const char kPrefsUpdateCheckResponseHash[];
- extern const char kPrefsUpdateCompletedBootTime[];
- extern const char kPrefsUpdateCompletedOnBootId[];
- extern const char kPrefsUpdateDurationUptime[];
- extern const char kPrefsUpdateFirstSeenAt[];
- extern const char kPrefsUpdateOverCellularPermission[];
- extern const char kPrefsUpdateOverCellularTargetVersion[];
- extern const char kPrefsUpdateOverCellularTargetSize[];
- extern const char kPrefsUpdateServerCertificate[];
- extern const char kPrefsUpdateStateNextDataLength[];
- extern const char kPrefsUpdateStateNextDataOffset[];
- extern const char kPrefsUpdateStateNextOperation[];
- extern const char kPrefsUpdateStatePayloadIndex[];
- extern const char kPrefsUpdateStateSHA256Context[];
- extern const char kPrefsUpdateStateSignatureBlob[];
- extern const char kPrefsUpdateStateSignedSHA256Context[];
- extern const char kPrefsUpdateBootTimestampStart[];
- extern const char kPrefsUpdateTimestampStart[];
- extern const char kPrefsUrlSwitchCount[];
- extern const char kPrefsVerityWritten[];
- extern const char kPrefsWallClockScatteringWaitPeriod[];
- extern const char kPrefsWallClockStagingWaitPeriod[];
- extern const char kPayloadPropertyFileSize[];
- extern const char kPayloadPropertyFileHash[];
- extern const char kPayloadPropertyMetadataSize[];
- extern const char kPayloadPropertyMetadataHash[];
- extern const char kPayloadPropertyAuthorization[];
- extern const char kPayloadPropertyUserAgent[];
- extern const char kPayloadPropertyPowerwash[];
- extern const char kPayloadPropertyNetworkId[];
- extern const char kPayloadPropertySwitchSlotOnReboot[];
- extern const char kPayloadPropertyRunPostInstall[];
- typedef enum {
- kDownloadSourceHttpsServer,
- kDownloadSourceHttpServer,
- kDownloadSourceHttpPeer,
-
- kNumDownloadSources
- } DownloadSource;
- typedef enum {
- kPayloadTypeFull,
- kPayloadTypeDelta,
- kPayloadTypeForcedFull,
-
- kNumPayloadTypes
- } PayloadType;
- const int kMaxP2PAttempts = 10;
- const int kMaxP2PAttemptTimeSeconds = 5 * 24 * 60 * 60;
- const int kMaxP2PNetworkWaitTimeSeconds = 6 * 60 * 60;
- const int kMaxP2PFilesToKeep = 3;
- const int kMaxP2PFileAgeDays = 5;
- const int kNumDefaultUmaBuckets = 50;
- const int kNumBytesInOneMiB = 1024 * 1024;
- const int kDownloadMaxRedirects = 10;
- const int kDownloadLowSpeedLimitBps = 1;
- const int kDownloadP2PLowSpeedLimitBps = 25 * 1000;
- const int kDownloadLowSpeedTimeSeconds = 30;
- const int kDownloadDevModeLowSpeedTimeSeconds = 180;
- const int kDownloadP2PLowSpeedTimeSeconds = 60;
- const int kDownloadMaxRetryCount = 20;
- const int kDownloadMaxRetryCountOobeNotComplete = 3;
- const int kDownloadMaxRetryCountInteractive = 3;
- const int kDownloadP2PMaxRetryCount = 5;
- const int kDownloadConnectTimeoutSeconds = 30;
- const int kDownloadP2PConnectTimeoutSeconds = 5;
- const int kSHA256Size = 32;
- }
- #endif
|