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 | #include "update_engine/constants.h" |
| 6 | |
| 7 | namespace chromeos_update_engine { |
| 8 | |
| 9 | const char kPowerwashMarkerFile[] = |
Chris Sosa | aa18e16 | 2013-06-20 13:20:30 -0700 | [diff] [blame] | 10 | "/mnt/stateful_partition/factory_install_reset"; |
| 11 | |
| 12 | const char kPowerwashCommand[] = "safe fast keepimg\n"; |
| 13 | |
| 14 | const char kPowerwashSafePrefsDir[] = |
| 15 | "/mnt/stateful_partition/unencrypted/preserve/update_engine/prefs"; |
| 16 | |
| 17 | const char kPrefsDirectory[] = "/var/lib/update_engine/prefs"; |
| 18 | |
| 19 | const char kStatefulPartition[] = "/mnt/stateful_partition"; |
Jay Srinivasan | 1c0fe79 | 2013-03-28 16:45:25 -0700 | [diff] [blame] | 20 | |
Chris Sosa | be45bef | 2013-04-09 18:25:12 -0700 | [diff] [blame] | 21 | const char kSystemRebootedMarkerFile[] = "/tmp/update_engine_update_recorded"; |
| 22 | |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 23 | // Constants defining keys for the persisted state of update engine. |
David Zeuthen | 4e1d149 | 2014-04-25 13:12:27 -0700 | [diff] [blame] | 24 | const char kPrefsAttemptInProgress[] = "attempt-in-progress"; |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 25 | const char kPrefsBackoffExpiryTime[] = "backoff-expiry-time"; |
| 26 | const char kPrefsCertificateReportToSendDownload[] = |
| 27 | "certificate-report-to-send-download"; |
| 28 | const char kPrefsCertificateReportToSendUpdate[] = |
| 29 | "certificate-report-to-send-update"; |
Jay Srinivasan | 19409b7 | 2013-04-12 19:23:36 -0700 | [diff] [blame] | 30 | const char kPrefsCurrentBytesDownloaded[] = "current-bytes-downloaded"; |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 31 | const char kPrefsCurrentResponseSignature[] = "current-response-signature"; |
| 32 | const char kPrefsCurrentUrlFailureCount[] = "current-url-failure-count"; |
| 33 | const char kPrefsCurrentUrlIndex[] = "current-url-index"; |
David Zeuthen | 985b112 | 2013-10-09 12:13:15 -0700 | [diff] [blame] | 34 | const char kPrefsDailyMetricsLastReportedAt[] = |
| 35 | "daily-metrics-last-reported-at"; |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 36 | const char kPrefsDeltaUpdateFailures[] = "delta-update-failures"; |
Alex Deymo | 820cc70 | 2013-06-28 15:43:46 -0700 | [diff] [blame] | 37 | const char kPrefsFullPayloadAttemptNumber[] = "full-payload-attempt-number"; |
David Zeuthen | 639aa36 | 2014-02-03 16:23:44 -0800 | [diff] [blame] | 38 | const char kPrefsInstallDateDays[] = "install-date-days"; |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 39 | const char kPrefsLastActivePingDay[] = "last-active-ping-day"; |
| 40 | const char kPrefsLastRollCallPingDay[] = "last-roll-call-ping-day"; |
| 41 | const char kPrefsManifestMetadataSize[] = "manifest-metadata-size"; |
David Zeuthen | 33bae49 | 2014-02-25 16:16:18 -0800 | [diff] [blame] | 42 | const char kPrefsMetricsAttemptLastReportingTime[] = |
| 43 | "metrics-attempt-last-reporting-time"; |
| 44 | const char kPrefsMetricsCheckLastReportingTime[] = |
| 45 | "metrics-check-last-reporting-time"; |
Chris Sosa | be45bef | 2013-04-09 18:25:12 -0700 | [diff] [blame] | 46 | const char kPrefsNumReboots[] = "num-reboots"; |
David Zeuthen | a573d6f | 2013-06-14 16:13:36 -0700 | [diff] [blame] | 47 | const char kPrefsNumResponsesSeen[] = "num-responses-seen"; |
David Zeuthen | 27a48bc | 2013-08-06 12:06:29 -0700 | [diff] [blame] | 48 | const char kPrefsP2PEnabled[] = "p2p-enabled"; |
David Zeuthen | 639aa36 | 2014-02-03 16:23:44 -0800 | [diff] [blame] | 49 | const char kPrefsP2PFirstAttemptTimestamp[] = "p2p-first-attempt-timestamp"; |
| 50 | const char kPrefsP2PNumAttempts[] = "p2p-num-attempts"; |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 51 | const char kPrefsPayloadAttemptNumber[] = "payload-attempt-number"; |
| 52 | const char kPrefsPreviousVersion[] = "previous-version"; |
| 53 | const char kPrefsResumedUpdateFailures[] = "resumed-update-failures"; |
Chris Sosa | aa18e16 | 2013-06-20 13:20:30 -0700 | [diff] [blame] | 54 | const char kPrefsRollbackVersion[] = "rollback-version"; |
David Zeuthen | e4c58bf | 2013-06-18 17:26:50 -0700 | [diff] [blame] | 55 | const char kPrefsSystemUpdatedMarker[] = "system-updated-marker"; |
Alex Deymo | 4243291 | 2013-07-12 20:21:15 -0700 | [diff] [blame] | 56 | const char kPrefsTargetVersionAttempt[] = "target-version-attempt"; |
| 57 | const char kPrefsTargetVersionInstalledFrom[] = "target-version-installed-from"; |
| 58 | const char kPrefsTargetVersionUniqueId[] = "target-version-unique-id"; |
Jay Srinivasan | 19409b7 | 2013-04-12 19:23:36 -0700 | [diff] [blame] | 59 | const char kPrefsTotalBytesDownloaded[] = "total-bytes-downloaded"; |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 60 | const char kPrefsUpdateCheckCount[] = "update-check-count"; |
| 61 | const char kPrefsUpdateCheckResponseHash[] = "update-check-response-hash"; |
David Zeuthen | cc6f996 | 2013-04-18 11:57:24 -0700 | [diff] [blame] | 62 | const char kPrefsUpdateDurationUptime[] = "update-duration-uptime"; |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 63 | const char kPrefsUpdateFirstSeenAt[] = "update-first-seen-at"; |
Alex Deymo | f4867c4 | 2013-06-28 14:41:39 -0700 | [diff] [blame] | 64 | const char kPrefsUpdateOverCellularPermission[] = |
| 65 | "update-over-cellular-permission"; |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 66 | const char kPrefsUpdateServerCertificate[] = "update-server-cert"; |
David Zeuthen | 41996ad | 2013-09-24 15:43:24 -0700 | [diff] [blame] | 67 | const char kPrefsUpdateStateNextDataLength[] = "update-state-next-data-length"; |
David Zeuthen | 639aa36 | 2014-02-03 16:23:44 -0800 | [diff] [blame] | 68 | const char kPrefsUpdateStateNextDataOffset[] = "update-state-next-data-offset"; |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 69 | const char kPrefsUpdateStateNextOperation[] = "update-state-next-operation"; |
| 70 | const char kPrefsUpdateStateSHA256Context[] = "update-state-sha-256-context"; |
| 71 | const char kPrefsUpdateStateSignatureBlob[] = "update-state-signature-blob"; |
| 72 | const char kPrefsUpdateStateSignedSHA256Context[] = |
| 73 | "update-state-signed-sha-256-context"; |
David Zeuthen | 9a017f2 | 2013-04-11 16:10:26 -0700 | [diff] [blame] | 74 | const char kPrefsUpdateTimestampStart[] = "update-timestamp-start"; |
David Zeuthen | cc6f996 | 2013-04-18 11:57:24 -0700 | [diff] [blame] | 75 | const char kPrefsUrlSwitchCount[] = "url-switch-count"; |
| 76 | const char kPrefsWallClockWaitPeriod[] = "wall-clock-wait-period"; |
Jay Srinivasan | d29695d | 2013-04-08 15:08:05 -0700 | [diff] [blame] | 77 | |
Alex Vakulenko | d2779df | 2014-06-16 13:19:00 -0700 | [diff] [blame^] | 78 | } // namespace chromeos_update_engine |