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