blob: b2c1de2a22ae48633eb5ddf1fc448bfa733eb05a [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
14// The contents of the powerwash marker file.
15extern const char kPowerwashCommand[];
16
Jay Srinivasand29695d2013-04-08 15:08:05 -070017// Constants related to preferences.
18extern const char kPrefsBackoffExpiryTime[];
19extern const char kPrefsCertificateReportToSendDownload[];
20extern const char kPrefsCertificateReportToSendUpdate[];
Jay Srinivasan19409b72013-04-12 19:23:36 -070021extern const char kPrefsCurrentBytesDownloaded[];
Jay Srinivasand29695d2013-04-08 15:08:05 -070022extern const char kPrefsCurrentResponseSignature[];
23extern const char kPrefsCurrentUrlFailureCount[];
24extern const char kPrefsCurrentUrlIndex[];
25extern const char kPrefsDeltaUpdateFailures[];
26extern const char kPrefsLastActivePingDay[];
27extern const char kPrefsLastRollCallPingDay[];
28extern const char kPrefsManifestMetadataSize[];
29extern const char kPrefsPayloadAttemptNumber[];
30extern const char kPrefsPreviousVersion[];
31extern const char kPrefsResumedUpdateFailures[];
Jay Srinivasan19409b72013-04-12 19:23:36 -070032extern const char kPrefsTotalBytesDownloaded[];
Jay Srinivasand29695d2013-04-08 15:08:05 -070033extern const char kPrefsUpdateCheckCount[];
34extern const char kPrefsUpdateCheckResponseHash[];
35extern const char kPrefsUpdateFirstSeenAt[];
36extern const char kPrefsUpdateServerCertificate[];
37extern const char kPrefsUpdateStateNextDataOffset[];
38extern const char kPrefsUpdateStateNextOperation[];
39extern const char kPrefsUpdateStateSHA256Context[];
40extern const char kPrefsUpdateStateSignatureBlob[];
41extern const char kPrefsUpdateStateSignedSHA256Context[];
42extern const char kPrefsWallClockWaitPeriod[];
David Zeuthen9a017f22013-04-11 16:10:26 -070043extern const char kPrefsUpdateTimestampStart[];
44extern const char kPrefsUpdateDurationUptime[];
Jay Srinivasand29695d2013-04-08 15:08:05 -070045
Jay Srinivasan19409b72013-04-12 19:23:36 -070046// A download source is any combination of protocol and server (that's of
47// interest to us when looking at UMA metrics) using which we may download
48// the payload.
49typedef enum {
50 kDownloadSourceHttpsServer, // UMA Binary representation: 0001
51 kDownloadSourceHttpServer, // UMA Binary representation: 0010
52
53 // Note: Add new sources only above this line.
54 kNumDownloadSources
55} DownloadSource;
56
57// The default number of UMA buckets for metrics.
58const int kNumDefaultUmaBuckets = 50;
59
60// General constants
61const int kNumBytesInOneMiB = 1024 * 1024;
62
Jay Srinivasan1c0fe792013-03-28 16:45:25 -070063} // namespace chromeos_update_engine
64
65#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_CONSTANTS_H