OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/common/metrics_constants_util_win.h" |
| 6 |
| 7 #include "chrome/installer/util/browser_distribution.h" |
| 8 |
| 9 namespace { |
| 10 |
| 11 // Returns the registry path for this product with |suffix| appended to it. |
| 12 // |suffix| is expected to provide the separator. |
| 13 base::string16 GetSuffixedRegistryPath(const wchar_t* suffix) { |
| 14 BrowserDistribution* chrome_distribution = |
| 15 BrowserDistribution::GetDistribution(); |
| 16 DCHECK(chrome_distribution); |
| 17 DCHECK_EQ(BrowserDistribution::CHROME_BROWSER, |
| 18 chrome_distribution->GetType()); |
| 19 |
| 20 DCHECK_EQ(L'\\', *suffix); |
| 21 DCHECK_NE(L'\\', chrome_distribution->GetRegistryPath().back()); |
| 22 |
| 23 return chrome_distribution->GetRegistryPath() + suffix; |
| 24 } |
| 25 |
| 26 } // namespace |
| 27 |
| 28 namespace chrome { |
| 29 |
| 30 base::string16 GetBrowserCrashDumpAttemptsRegistryPath() { |
| 31 return GetSuffixedRegistryPath(L"\\BrowserCrashDumpAttempts"); |
| 32 } |
| 33 |
| 34 base::string16 GetBrowserExitCodesRegistryPath() { |
| 35 return GetSuffixedRegistryPath(L"\\BrowserExitCodes"); |
| 36 } |
| 37 |
| 38 } // namespace chrome |
OLD | NEW |