blob: 4bd96853b2a0cdfcd7aaa723eef0ad75e3b81019 [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#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_CONSTANTS_H
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_CONSTANTS_H
7
8namespace 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.
12extern const char kPowerwashMarkerFile[];
13
Chris Sosabe45bef2013-04-09 18:25:12 -070014// Path to the marker file we use to indicate we've recorded a system reboot.
15extern const char kSystemRebootedMarkerFile[];
16
Jay Srinivasan1c0fe792013-03-28 16:45:25 -070017// The contents of the powerwash marker file.
18extern const char kPowerwashCommand[];
19
Chris Sosabe45bef2013-04-09 18:25:12 -070020// Path to the stateful partition on the root filesystem.
21extern const char kStatefulPartition[];
22
Jay Srinivasand29695d2013-04-08 15:08:05 -070023// Constants related to preferences.
24extern const char kPrefsBackoffExpiryTime[];
25extern const char kPrefsCertificateReportToSendDownload[];
26extern const char kPrefsCertificateReportToSendUpdate[];
Jay Srinivasan19409b72013-04-12 19:23:36 -070027extern const char kPrefsCurrentBytesDownloaded[];
Jay Srinivasand29695d2013-04-08 15:08:05 -070028extern const char kPrefsCurrentResponseSignature[];
29extern const char kPrefsCurrentUrlFailureCount[];
30extern const char kPrefsCurrentUrlIndex[];
31extern const char kPrefsDeltaUpdateFailures[];
32extern const char kPrefsLastActivePingDay[];
33extern const char kPrefsLastRollCallPingDay[];
34extern const char kPrefsManifestMetadataSize[];
Chris Sosabe45bef2013-04-09 18:25:12 -070035extern const char kPrefsNumReboots[];
David Zeuthena573d6f2013-06-14 16:13:36 -070036extern const char kPrefsNumResponsesSeen[];
Jay Srinivasand29695d2013-04-08 15:08:05 -070037extern const char kPrefsPayloadAttemptNumber[];
38extern const char kPrefsPreviousVersion[];
39extern const char kPrefsResumedUpdateFailures[];
Jay Srinivasan19409b72013-04-12 19:23:36 -070040extern const char kPrefsTotalBytesDownloaded[];
Jay Srinivasand29695d2013-04-08 15:08:05 -070041extern const char kPrefsUpdateCheckCount[];
42extern const char kPrefsUpdateCheckResponseHash[];
David Zeuthencc6f9962013-04-18 11:57:24 -070043extern const char kPrefsUpdateDurationUptime[];
Jay Srinivasand29695d2013-04-08 15:08:05 -070044extern const char kPrefsUpdateFirstSeenAt[];
45extern const char kPrefsUpdateServerCertificate[];
46extern const char kPrefsUpdateStateNextDataOffset[];
47extern const char kPrefsUpdateStateNextOperation[];
48extern const char kPrefsUpdateStateSHA256Context[];
49extern const char kPrefsUpdateStateSignatureBlob[];
50extern const char kPrefsUpdateStateSignedSHA256Context[];
David Zeuthen9a017f22013-04-11 16:10:26 -070051extern const char kPrefsUpdateTimestampStart[];
David Zeuthencc6f9962013-04-18 11:57:24 -070052extern const char kPrefsUrlSwitchCount[];
53extern const char kPrefsWallClockWaitPeriod[];
Jay Srinivasand29695d2013-04-08 15:08:05 -070054
Jay Srinivasan19409b72013-04-12 19:23:36 -070055// A download source is any combination of protocol and server (that's of
56// interest to us when looking at UMA metrics) using which we may download
57// the payload.
58typedef enum {
59 kDownloadSourceHttpsServer, // UMA Binary representation: 0001
60 kDownloadSourceHttpServer, // UMA Binary representation: 0010
61
62 // Note: Add new sources only above this line.
63 kNumDownloadSources
64} DownloadSource;
65
66// The default number of UMA buckets for metrics.
67const int kNumDefaultUmaBuckets = 50;
68
69// General constants
70const int kNumBytesInOneMiB = 1024 * 1024;
71
Jay Srinivasan1c0fe792013-03-28 16:45:25 -070072} // namespace chromeos_update_engine
73
74#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_CONSTANTS_H