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

Unified Diff: chrome/common/chrome_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: rebase on r373339 and rm unused install_util.h include Created 4 years, 11 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/chrome_constants_util_win.cc
diff --git a/chrome/common/chrome_constants_util_win.cc b/chrome/common/chrome_constants_util_win.cc
new file mode 100644
index 0000000000000000000000000000000000000000..520b5e88aeacf20139f9a89a9e813bb2375a1128
--- /dev/null
+++ b/chrome/common/chrome_constants_util_win.cc
@@ -0,0 +1,28 @@
+// 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/chrome_constants_util_win.h"
+
+#include "chrome/installer/util/browser_distribution.h"
grt (UTC plus 2) 2016/02/04 15:52:30 common_constants doesn't depend on installer_util,
gab 2016/03/07 21:53:55 Good catch, I think it's reasonable to add the dep
grt (UTC plus 2) 2016/03/08 15:44:47 I'm concerned about making a "constants" target pu
gab 2016/03/09 20:29:35 Fair enough. Thought of naming these chrome_paths_
grt (UTC plus 2) 2016/03/10 19:14:42 Huh. Here's what is currently used by chrome.exe f
+
+namespace {
+
+base::string16 GetSuffixedRegistryPath(const wchar_t* suffix) {
+ BrowserDistribution* chrome_distribution =
grt (UTC plus 2) 2016/02/04 15:52:30 DCHECK_EQ(L'\\', *suffix);
gab 2016/03/07 21:53:55 Done.
+ BrowserDistribution::GetDistribution();
+ DCHECK(chrome_distribution);
+ DCHECK_EQ(BrowserDistribution::CHROME_BROWSER,
+ chrome_distribution->GetType());
+ return chrome_distribution->GetRegistryPath() + suffix;
grt (UTC plus 2) 2016/02/04 15:52:30 DCHECK_NE(L'\\', the last char of GetRegistryPath(
gab 2016/03/07 21:53:55 Done.
+}
+
+} // namespace
+
+base::string16 GetBrowserCrashDumpAttemptsRegistryPath() {
+ return GetSuffixedRegistryPath(L"\\BrowserCrashDumpAttempts");
+}
+
+base::string16 GetBrowserExitCodesRegistryPath() {
+ return GetSuffixedRegistryPath(L"\\BrowserExitCodes");
+}

Powered by Google App Engine
This is Rietveld 408576698