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

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

Issue 2812223003: Move shared constants to //components/chrome_cleaner (Closed)
Patch Set: Comment on #endif line 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/constants/constants.h
diff --git a/components/chrome_cleaner/constants/constants.h b/components/chrome_cleaner/constants/constants.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a50544b3dfd1ae403ea644f37840e731c2051ad
--- /dev/null
+++ b/components/chrome_cleaner/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_CONSTANTS_CONSTANTS_H_
+#define COMPONENTS_CHROME_CLEANER_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.
+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
+// 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[];
+
+// 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[];
+
+// Registry values names where metrics are written to.
+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[];
+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;
+const int kSwReporterNothingFound = 2;
+const int kSwReporterPostRebootCleanupNeeded = 4;
+const int kSwReporterDelayedPostRebootCleanupNeeded = 15;
+
+} // namespace chrome_cleaner
+
+#endif // COMPONENTS_CHROME_CLEANER_CONSTANTS_CONSTANTS_H_

Powered by Google App Engine
This is Rietveld 408576698