blob: b68bd04c7a330db1447f2f9860c2215305fadd2c [file] [log] [blame]
Jay Srinivasan1c0fe792013-03-28 16:45:25 -07001// 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
7namespace chromeos_update_engine {
8
9const char kPowerwashMarkerFile[] =
Chris Sosaaa18e162013-06-20 13:20:30 -070010 "/mnt/stateful_partition/factory_install_reset";
11
12const char kPowerwashCommand[] = "safe fast keepimg\n";
13
14const char kPowerwashSafePrefsDir[] =
15 "/mnt/stateful_partition/unencrypted/preserve/update_engine/prefs";
16
17const char kPrefsDirectory[] = "/var/lib/update_engine/prefs";
18
19const char kStatefulPartition[] = "/mnt/stateful_partition";
Jay Srinivasan1c0fe792013-03-28 16:45:25 -070020
Chris Sosabe45bef2013-04-09 18:25:12 -070021const char kSystemRebootedMarkerFile[] = "/tmp/update_engine_update_recorded";
22
Jay Srinivasand29695d2013-04-08 15:08:05 -070023// Constants defining keys for the persisted state of update engine.
David Zeuthen4e1d1492014-04-25 13:12:27 -070024const char kPrefsAttemptInProgress[] = "attempt-in-progress";
Jay Srinivasand29695d2013-04-08 15:08:05 -070025const char kPrefsBackoffExpiryTime[] = "backoff-expiry-time";
26const char kPrefsCertificateReportToSendDownload[] =
27 "certificate-report-to-send-download";
28const char kPrefsCertificateReportToSendUpdate[] =
29 "certificate-report-to-send-update";
Jay Srinivasan19409b72013-04-12 19:23:36 -070030const char kPrefsCurrentBytesDownloaded[] = "current-bytes-downloaded";
Jay Srinivasand29695d2013-04-08 15:08:05 -070031const char kPrefsCurrentResponseSignature[] = "current-response-signature";
32const char kPrefsCurrentUrlFailureCount[] = "current-url-failure-count";
33const char kPrefsCurrentUrlIndex[] = "current-url-index";
David Zeuthen985b1122013-10-09 12:13:15 -070034const char kPrefsDailyMetricsLastReportedAt[] =
35 "daily-metrics-last-reported-at";
Jay Srinivasand29695d2013-04-08 15:08:05 -070036const char kPrefsDeltaUpdateFailures[] = "delta-update-failures";
Alex Deymo820cc702013-06-28 15:43:46 -070037const char kPrefsFullPayloadAttemptNumber[] = "full-payload-attempt-number";
David Zeuthen639aa362014-02-03 16:23:44 -080038const char kPrefsInstallDateDays[] = "install-date-days";
Jay Srinivasand29695d2013-04-08 15:08:05 -070039const char kPrefsLastActivePingDay[] = "last-active-ping-day";
40const char kPrefsLastRollCallPingDay[] = "last-roll-call-ping-day";
41const char kPrefsManifestMetadataSize[] = "manifest-metadata-size";
David Zeuthen33bae492014-02-25 16:16:18 -080042const char kPrefsMetricsAttemptLastReportingTime[] =
43 "metrics-attempt-last-reporting-time";
44const char kPrefsMetricsCheckLastReportingTime[] =
45 "metrics-check-last-reporting-time";
Chris Sosabe45bef2013-04-09 18:25:12 -070046const char kPrefsNumReboots[] = "num-reboots";
David Zeuthena573d6f2013-06-14 16:13:36 -070047const char kPrefsNumResponsesSeen[] = "num-responses-seen";
David Zeuthen27a48bc2013-08-06 12:06:29 -070048const char kPrefsP2PEnabled[] = "p2p-enabled";
David Zeuthen639aa362014-02-03 16:23:44 -080049const char kPrefsP2PFirstAttemptTimestamp[] = "p2p-first-attempt-timestamp";
50const char kPrefsP2PNumAttempts[] = "p2p-num-attempts";
Jay Srinivasand29695d2013-04-08 15:08:05 -070051const char kPrefsPayloadAttemptNumber[] = "payload-attempt-number";
52const char kPrefsPreviousVersion[] = "previous-version";
53const char kPrefsResumedUpdateFailures[] = "resumed-update-failures";
Chris Sosaaa18e162013-06-20 13:20:30 -070054const char kPrefsRollbackVersion[] = "rollback-version";
David Zeuthene4c58bf2013-06-18 17:26:50 -070055const char kPrefsSystemUpdatedMarker[] = "system-updated-marker";
Alex Deymo42432912013-07-12 20:21:15 -070056const char kPrefsTargetVersionAttempt[] = "target-version-attempt";
57const char kPrefsTargetVersionInstalledFrom[] = "target-version-installed-from";
58const char kPrefsTargetVersionUniqueId[] = "target-version-unique-id";
Jay Srinivasan19409b72013-04-12 19:23:36 -070059const char kPrefsTotalBytesDownloaded[] = "total-bytes-downloaded";
Jay Srinivasand29695d2013-04-08 15:08:05 -070060const char kPrefsUpdateCheckCount[] = "update-check-count";
61const char kPrefsUpdateCheckResponseHash[] = "update-check-response-hash";
David Zeuthencc6f9962013-04-18 11:57:24 -070062const char kPrefsUpdateDurationUptime[] = "update-duration-uptime";
Jay Srinivasand29695d2013-04-08 15:08:05 -070063const char kPrefsUpdateFirstSeenAt[] = "update-first-seen-at";
Alex Deymof4867c42013-06-28 14:41:39 -070064const char kPrefsUpdateOverCellularPermission[] =
65 "update-over-cellular-permission";
Jay Srinivasand29695d2013-04-08 15:08:05 -070066const char kPrefsUpdateServerCertificate[] = "update-server-cert";
David Zeuthen41996ad2013-09-24 15:43:24 -070067const char kPrefsUpdateStateNextDataLength[] = "update-state-next-data-length";
David Zeuthen639aa362014-02-03 16:23:44 -080068const char kPrefsUpdateStateNextDataOffset[] = "update-state-next-data-offset";
Jay Srinivasand29695d2013-04-08 15:08:05 -070069const char kPrefsUpdateStateNextOperation[] = "update-state-next-operation";
70const char kPrefsUpdateStateSHA256Context[] = "update-state-sha-256-context";
71const char kPrefsUpdateStateSignatureBlob[] = "update-state-signature-blob";
72const char kPrefsUpdateStateSignedSHA256Context[] =
73 "update-state-signed-sha-256-context";
David Zeuthen9a017f22013-04-11 16:10:26 -070074const char kPrefsUpdateTimestampStart[] = "update-timestamp-start";
David Zeuthencc6f9962013-04-18 11:57:24 -070075const char kPrefsUrlSwitchCount[] = "url-switch-count";
76const char kPrefsWallClockWaitPeriod[] = "wall-clock-wait-period";
Jay Srinivasand29695d2013-04-08 15:08:05 -070077
Alex Vakulenkod2779df2014-06-16 13:19:00 -070078} // namespace chromeos_update_engine