OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium 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 COMPONENTS_CHROME_CLEANER_PUBLIC_CONSTANTS_CONSTANTS_H_ | |
6 #define COMPONENTS_CHROME_CLEANER_PUBLIC_CONSTANTS_CONSTANTS_H_ | |
7 | |
8 // Constants shared by the Chromium and the Chrome Cleanaup tool repos. | |
9 | |
10 namespace chrome_cleaner { | |
11 | |
12 // Switches sent from Chrome to either the Software Reporter or the Chrome | |
13 // Cleanup tool. | |
14 | |
15 // The current Chrome channel. The value of this flag is an integer with values | |
16 // according to version_info::Channel enum: 0: unknown; 1: canary; 2: dev; | |
17 // 3: beta; 4: stable. | |
Joe Mason
2017/04/13 17:54:02
Nit: I wouldn't list the exact values here. It can
ftirelo
2017/04/18 15:26:49
Done.
| |
18 extern const char kChromeChannelSwitch[]; | |
19 | |
20 // The path to Chrome's executable. | |
21 extern const char kChromeExePathSwitch[]; | |
22 | |
23 // The switch to be passed to the Software Reporter process with the Mojo pipe | |
Joe Mason
2017/04/13 17:54:01
Nit: The comment at the top of the namespace alrea
ftirelo
2017/04/18 15:26:49
Done.
| |
24 // token for the IPC communication with Chrome. | |
25 extern const char kChromeMojoPipeTokenSwitch[]; | |
26 | |
27 // Indicates that a cleaner run was started by Chrome. | |
28 extern const char kChromePromptSwitch[]; | |
29 | |
30 // Indicates that the current Chrome installation was a system-level | |
31 // installation. | |
32 extern const char kChromeSystemInstallSwitch[]; | |
33 | |
34 // The Chrome version string. | |
35 extern const char kChromeVersionSwitch[]; | |
36 | |
37 // Indicates that crash reporting is enabled for the current user. | |
38 extern const char kEnableCrashReporting[]; | |
Joe Mason
2017/04/13 17:54:02
Nit: rename this kEnableCrashReportingSwitch while
ftirelo
2017/04/18 15:26:49
Done.
| |
39 | |
40 // Indicates that the current user opted into Safe Browsing Extended Reporting. | |
41 extern const char kExtendedSafeBrowsingEnabledSwitch[]; | |
42 | |
43 // Identifier used to group all reports generated during the same run of the | |
44 // software reporter (which may include multiple invocations of the reporter | |
45 /// binary, each generating a report). An ASCII, base-64 encoded random string. | |
46 extern const char kSessionIdSwitch[]; | |
47 | |
48 // Indicates that metrics reporting is enabled for the current user. | |
49 extern const char kUmaUserSwitch[]; | |
50 | |
51 // Registry paths where the reporter and the cleaner will write metrics data | |
52 // to be reported by Chrome. | |
53 | |
54 // TODO(b/647763) Change the registry key to properly handle cases when the | |
55 // user runs Google Chrome stable alongside Google Chrome SxS. | |
56 extern const wchar_t kSoftwareRemovalToolRegistryKey[]; | |
57 | |
58 // The suffix for the registry key where cleaner metrics are written to. | |
59 extern const wchar_t kCleanerSuffixRegistryKey[]; | |
Joe Mason
2017/04/13 17:54:01
Nit: I prefer the other name, kCleanerSubKey, sinc
ftirelo
2017/04/18 15:26:49
Done.
| |
60 | |
61 // Registry values names where metrics are written to. | |
Joe Mason
2017/04/13 17:54:01
Nit: "value names", I think.
ftirelo
2017/04/18 15:26:49
Done.
| |
62 extern const wchar_t kEndTimeValueName[]; | |
63 extern const wchar_t kEngineErrorCodeValueName[]; | |
64 extern const wchar_t kExitCodeValueName[]; | |
65 extern const wchar_t kFoundUwsValueName[]; | |
66 extern const wchar_t kLogsUploadResultValueName[]; | |
67 extern const wchar_t kMemoryUsedValueName[]; | |
68 extern const wchar_t kScanTimesSubKey[]; | |
Joe Mason
2017/04/13 17:54:01
Nit: This should go in the "registry paths" sectio
ftirelo
2017/04/18 15:26:49
Done.
| |
69 extern const wchar_t kStartTimeValueName[]; | |
70 extern const wchar_t kUploadResultsValueName[]; | |
71 extern const wchar_t kVersionValueName[]; | |
72 | |
73 // Exit codes from the Software Reporter process identified by Chrome. | |
74 const int kSwReporterCleanupNeeded = 0; | |
Joe Mason
2017/04/13 17:54:01
Nit: these should be constexpr.
ftirelo
2017/04/18 15:26:49
Done.
| |
75 const int kSwReporterNothingFound = 2; | |
76 const int kSwReporterPostRebootCleanupNeeded = 4; | |
77 const int kSwReporterDelayedPostRebootCleanupNeeded = 15; | |
78 | |
79 } // namespace chrome_cleaner | |
80 | |
81 #endif // COMPONENTS_CHROME_CLEANER_PUBLIC_CONSTANTS_CONSTANTS_H_ | |
OLD | NEW |