Jay Srinivasan | 1c0fe79 | 2013-03-28 16:45:25 -0700 | [diff] [blame] | 1 | // Copyright (c) 2013 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_CONSTANTS_H |
| 6 | #define CHROMEOS_PLATFORM_UPDATE_ENGINE_CONSTANTS_H |
| 7 | |
| 8 | namespace chromeos_update_engine { |
| 9 | |
| 10 | // The name of the marker file used to trigger powerwash when post-install |
| 11 | // completes successfully so that the device is powerwashed on next reboot. |
| 12 | extern const char kPowerwashMarkerFile[]; |
| 13 | |
| 14 | // The contents of the powerwash marker file. |
| 15 | extern const char kPowerwashCommand[]; |
| 16 | |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 17 | // Constants related to preferences. |
| 18 | extern const char kPrefsBackoffExpiryTime[]; |
| 19 | extern const char kPrefsCertificateReportToSendDownload[]; |
| 20 | extern const char kPrefsCertificateReportToSendUpdate[]; |
Jay Srinivasan | 19409b7 | 2013-04-12 19:23:36 -0700 | [diff] [blame] | 21 | extern const char kPrefsCurrentBytesDownloaded[]; |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 22 | extern const char kPrefsCurrentResponseSignature[]; |
| 23 | extern const char kPrefsCurrentUrlFailureCount[]; |
| 24 | extern const char kPrefsCurrentUrlIndex[]; |
| 25 | extern const char kPrefsDeltaUpdateFailures[]; |
| 26 | extern const char kPrefsLastActivePingDay[]; |
| 27 | extern const char kPrefsLastRollCallPingDay[]; |
| 28 | extern const char kPrefsManifestMetadataSize[]; |
| 29 | extern const char kPrefsPayloadAttemptNumber[]; |
| 30 | extern const char kPrefsPreviousVersion[]; |
| 31 | extern const char kPrefsResumedUpdateFailures[]; |
Jay Srinivasan | 19409b7 | 2013-04-12 19:23:36 -0700 | [diff] [blame] | 32 | extern const char kPrefsTotalBytesDownloaded[]; |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 33 | extern const char kPrefsUpdateCheckCount[]; |
| 34 | extern const char kPrefsUpdateCheckResponseHash[]; |
David Zeuthen | cc6f996 | 2013-04-18 11:57:24 -0700 | [diff] [blame^] | 35 | extern const char kPrefsUpdateDurationUptime[]; |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 36 | extern const char kPrefsUpdateFirstSeenAt[]; |
| 37 | extern const char kPrefsUpdateServerCertificate[]; |
| 38 | extern const char kPrefsUpdateStateNextDataOffset[]; |
| 39 | extern const char kPrefsUpdateStateNextOperation[]; |
| 40 | extern const char kPrefsUpdateStateSHA256Context[]; |
| 41 | extern const char kPrefsUpdateStateSignatureBlob[]; |
| 42 | extern const char kPrefsUpdateStateSignedSHA256Context[]; |
David Zeuthen | 9a017f2 | 2013-04-11 16:10:26 -0700 | [diff] [blame] | 43 | extern const char kPrefsUpdateTimestampStart[]; |
David Zeuthen | cc6f996 | 2013-04-18 11:57:24 -0700 | [diff] [blame^] | 44 | extern const char kPrefsUrlSwitchCount[]; |
| 45 | extern const char kPrefsWallClockWaitPeriod[]; |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 46 | |
Jay Srinivasan | 19409b7 | 2013-04-12 19:23:36 -0700 | [diff] [blame] | 47 | // A download source is any combination of protocol and server (that's of |
| 48 | // interest to us when looking at UMA metrics) using which we may download |
| 49 | // the payload. |
| 50 | typedef enum { |
| 51 | kDownloadSourceHttpsServer, // UMA Binary representation: 0001 |
| 52 | kDownloadSourceHttpServer, // UMA Binary representation: 0010 |
| 53 | |
| 54 | // Note: Add new sources only above this line. |
| 55 | kNumDownloadSources |
| 56 | } DownloadSource; |
| 57 | |
| 58 | // The default number of UMA buckets for metrics. |
| 59 | const int kNumDefaultUmaBuckets = 50; |
| 60 | |
| 61 | // General constants |
| 62 | const int kNumBytesInOneMiB = 1024 * 1024; |
| 63 | |
Jay Srinivasan | 1c0fe79 | 2013-03-28 16:45:25 -0700 | [diff] [blame] | 64 | } // namespace chromeos_update_engine |
| 65 | |
| 66 | #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_CONSTANTS_H |