Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: components/chrome_cleaner/public/constants/constants.h

Issue 2812223003: Move shared constants to //components/chrome_cleaner (Closed)
Patch Set: Code review Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/chrome_cleaner/public/constants/constants.h
diff --git a/components/chrome_cleaner/public/constants/constants.h b/components/chrome_cleaner/public/constants/constants.h
new file mode 100644
index 0000000000000000000000000000000000000000..f2232d9f9656f321f2f67a478ad8153d5140bc39
--- /dev/null
+++ b/components/chrome_cleaner/public/constants/constants.h
@@ -0,0 +1,81 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_CHROME_CLEANER_PUBLIC_CONSTANTS_CONSTANTS_H_
+#define COMPONENTS_CHROME_CLEANER_PUBLIC_CONSTANTS_CONSTANTS_H_
+
+// Constants shared by the Chromium and the Chrome Cleanaup tool repos.
+
+namespace chrome_cleaner {
+
+// Switches sent from Chrome to either the Software Reporter or the Chrome
+// Cleanup tool.
+
+// The current Chrome channel. The value of this flag is an integer with values
+// according to version_info::Channel enum: 0: unknown; 1: canary; 2: dev;
+// 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.
+extern const char kChromeChannelSwitch[];
+
+// The path to Chrome's executable.
+extern const char kChromeExePathSwitch[];
+
+// 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.
+// token for the IPC communication with Chrome.
+extern const char kChromeMojoPipeTokenSwitch[];
+
+// Indicates that a cleaner run was started by Chrome.
+extern const char kChromePromptSwitch[];
+
+// Indicates that the current Chrome installation was a system-level
+// installation.
+extern const char kChromeSystemInstallSwitch[];
+
+// The Chrome version string.
+extern const char kChromeVersionSwitch[];
+
+// Indicates that crash reporting is enabled for the current user.
+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.
+
+// Indicates that the current user opted into Safe Browsing Extended Reporting.
+extern const char kExtendedSafeBrowsingEnabledSwitch[];
+
+// Identifier used to group all reports generated during the same run of the
+// software reporter (which may include multiple invocations of the reporter
+/// binary, each generating a report). An ASCII, base-64 encoded random string.
+extern const char kSessionIdSwitch[];
+
+// Indicates that metrics reporting is enabled for the current user.
+extern const char kUmaUserSwitch[];
+
+// Registry paths where the reporter and the cleaner will write metrics data
+// to be reported by Chrome.
+
+// TODO(b/647763) Change the registry key to properly handle cases when the
+// user runs Google Chrome stable alongside Google Chrome SxS.
+extern const wchar_t kSoftwareRemovalToolRegistryKey[];
+
+// The suffix for the registry key where cleaner metrics are written to.
+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.
+
+// 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.
+extern const wchar_t kEndTimeValueName[];
+extern const wchar_t kEngineErrorCodeValueName[];
+extern const wchar_t kExitCodeValueName[];
+extern const wchar_t kFoundUwsValueName[];
+extern const wchar_t kLogsUploadResultValueName[];
+extern const wchar_t kMemoryUsedValueName[];
+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.
+extern const wchar_t kStartTimeValueName[];
+extern const wchar_t kUploadResultsValueName[];
+extern const wchar_t kVersionValueName[];
+
+// Exit codes from the Software Reporter process identified by Chrome.
+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.
+const int kSwReporterNothingFound = 2;
+const int kSwReporterPostRebootCleanupNeeded = 4;
+const int kSwReporterDelayedPostRebootCleanupNeeded = 15;
+
+} // namespace chrome_cleaner
+
+#endif // COMPONENTS_CHROME_CLEANER_PUBLIC_CONSTANTS_CONSTANTS_H_

Powered by Google App Engine
This is Rietveld 408576698