blob: e97ec909e2638c66263c965c633da421f7f48d20 [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[];
Jay Srinivasand29695d2013-04-08 15:08:05 -070036extern const char kPrefsPayloadAttemptNumber[];
37extern const char kPrefsPreviousVersion[];
38extern const char kPrefsResumedUpdateFailures[];
Jay Srinivasan19409b72013-04-12 19:23:36 -070039extern const char kPrefsTotalBytesDownloaded[];
Jay Srinivasand29695d2013-04-08 15:08:05 -070040extern const char kPrefsUpdateCheckCount[];
41extern const char kPrefsUpdateCheckResponseHash[];
David Zeuthencc6f9962013-04-18 11:57:24 -070042extern const char kPrefsUpdateDurationUptime[];
Jay Srinivasand29695d2013-04-08 15:08:05 -070043extern const char kPrefsUpdateFirstSeenAt[];
44extern const char kPrefsUpdateServerCertificate[];
45extern const char kPrefsUpdateStateNextDataOffset[];
46extern const char kPrefsUpdateStateNextOperation[];
47extern const char kPrefsUpdateStateSHA256Context[];
48extern const char kPrefsUpdateStateSignatureBlob[];
49extern const char kPrefsUpdateStateSignedSHA256Context[];
David Zeuthen9a017f22013-04-11 16:10:26 -070050extern const char kPrefsUpdateTimestampStart[];
David Zeuthencc6f9962013-04-18 11:57:24 -070051extern const char kPrefsUrlSwitchCount[];
52extern const char kPrefsWallClockWaitPeriod[];
Jay Srinivasand29695d2013-04-08 15:08:05 -070053
Jay Srinivasan19409b72013-04-12 19:23:36 -070054// A download source is any combination of protocol and server (that's of
55// interest to us when looking at UMA metrics) using which we may download
56// the payload.
57typedef enum {
58 kDownloadSourceHttpsServer, // UMA Binary representation: 0001
59 kDownloadSourceHttpServer, // UMA Binary representation: 0010
60
61 // Note: Add new sources only above this line.
62 kNumDownloadSources
63} DownloadSource;
64
65// The default number of UMA buckets for metrics.
66const int kNumDefaultUmaBuckets = 50;
67
68// General constants
69const int kNumBytesInOneMiB = 1024 * 1024;
70
Jay Srinivasan1c0fe792013-03-28 16:45:25 -070071} // namespace chromeos_update_engine
72
73#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_CONSTANTS_H