blob: 3b8a918ee1944cd71d479610b6e201416eb64b7f [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[];
David Zeuthencc6f9962013-04-18 11:57:24 -070035extern const char kPrefsUpdateDurationUptime[];
Jay Srinivasand29695d2013-04-08 15:08:05 -070036extern const char kPrefsUpdateFirstSeenAt[];
37extern const char kPrefsUpdateServerCertificate[];
38extern const char kPrefsUpdateStateNextDataOffset[];
39extern const char kPrefsUpdateStateNextOperation[];
40extern const char kPrefsUpdateStateSHA256Context[];
41extern const char kPrefsUpdateStateSignatureBlob[];
42extern const char kPrefsUpdateStateSignedSHA256Context[];
David Zeuthen9a017f22013-04-11 16:10:26 -070043extern const char kPrefsUpdateTimestampStart[];
David Zeuthencc6f9962013-04-18 11:57:24 -070044extern const char kPrefsUrlSwitchCount[];
45extern const char kPrefsWallClockWaitPeriod[];
Jay Srinivasand29695d2013-04-08 15:08:05 -070046
Jay Srinivasan19409b72013-04-12 19:23:36 -070047// A download source is any combination of protocol and server (that's of
48// interest to us when looking at UMA metrics) using which we may download
49// the payload.
50typedef enum {
51 kDownloadSourceHttpsServer, // UMA Binary representation: 0001
52 kDownloadSourceHttpServer, // UMA Binary representation: 0010
53
54 // Note: Add new sources only above this line.
55 kNumDownloadSources
56} DownloadSource;
57
58// The default number of UMA buckets for metrics.
59const int kNumDefaultUmaBuckets = 50;
60
61// General constants
62const int kNumBytesInOneMiB = 1024 * 1024;
63
Jay Srinivasan1c0fe792013-03-28 16:45:25 -070064} // namespace chromeos_update_engine
65
66#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_CONSTANTS_H