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

Unified Diff: chrome/common/metrics_constants_util_win.cc

Issue 1630923002: Remove PRODUCT_STRING_PATH from chrome_constants.h on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@c2_rm_PSP_profile_resetter
Patch Set: nit Created 4 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: chrome/common/metrics_constants_util_win.cc
diff --git a/chrome/common/metrics_constants_util_win.cc b/chrome/common/metrics_constants_util_win.cc
new file mode 100644
index 0000000000000000000000000000000000000000..21538d0c078b64cdcb6562ce42512f744b0e9da3
--- /dev/null
+++ b/chrome/common/metrics_constants_util_win.cc
@@ -0,0 +1,38 @@
+// Copyright 2016 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.
+
+#include "chrome/common/metrics_constants_util_win.h"
+
+#include "chrome/installer/util/browser_distribution.h"
+
+namespace {
+
+// Returns the registry path for this product with |suffix| appended to it.
+// |suffix| is expected to provide the separator.
+base::string16 GetSuffixedRegistryPath(const wchar_t* suffix) {
+ BrowserDistribution* chrome_distribution =
+ BrowserDistribution::GetDistribution();
+ DCHECK(chrome_distribution);
+ DCHECK_EQ(BrowserDistribution::CHROME_BROWSER,
+ chrome_distribution->GetType());
+
+ DCHECK_EQ(L'\\', *suffix);
+ DCHECK_NE(L'\\', chrome_distribution->GetRegistryPath().back());
+
+ return chrome_distribution->GetRegistryPath() + suffix;
+}
+
+} // namespace
+
+namespace chrome {
+
+base::string16 GetBrowserCrashDumpAttemptsRegistryPath() {
+ return GetSuffixedRegistryPath(L"\\BrowserCrashDumpAttempts");
+}
+
+base::string16 GetBrowserExitCodesRegistryPath() {
+ return GetSuffixedRegistryPath(L"\\BrowserExitCodes");
+}
+
+} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698