Chromium Code Reviews| 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"); |
| +} |