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