Chromium Code Reviews| Index: chrome/common/chrome_constants.cc |
| diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc |
| index 69dbbe9c3893056dd4ff0d5780f0ac325f5af55e..9b05f4940332e4e48b2b8a10222334d0ccd92b82 100644 |
| --- a/chrome/common/chrome_constants.cc |
| +++ b/chrome/common/chrome_constants.cc |
| @@ -6,6 +6,10 @@ |
| #include "chrome/common/chrome_constants.h" |
| #include "chrome/common/chrome_version.h" |
| +#if defined(OS_WIN) |
| +#include "chrome/installer/util/browser_distribution.h" |
| +#endif |
| + |
| #define FPL FILE_PATH_LITERAL |
| #if defined(OS_MACOSX) |
| @@ -207,14 +211,6 @@ const wchar_t kMetroNavigationAndSearchMessage[] = |
| L"CHROME_METRO_NAV_SEARCH_REQUEST"; |
| const wchar_t kMetroGetCurrentTabInfoMessage[] = |
| L"CHROME_METRO_GET_CURRENT_TAB_INFO"; |
| -// This is used by breakpad and the metrics reporting. |
| -const wchar_t kBrowserCrashDumpAttemptsRegistryPath[] = |
| - L"Software\\" PRODUCT_STRING_PATH L"\\BrowserCrashDumpAttempts"; |
| -const wchar_t kBrowserCrashDumpAttemptsRegistryPathSxS[] = |
| - L"Software\\" PRODUCT_STRING_PATH L"\\BrowserCrashDumpAttemptsSxS"; |
| -// This is used by browser exit code metrics reporting. |
| -const wchar_t kBrowserExitCodesRegistryPath[] = |
| - L"Software\\" PRODUCT_STRING_PATH L"\\BrowserExitCodes"; |
| #endif |
| #if defined(OS_CHROMEOS) |
| @@ -231,6 +227,31 @@ const char kApplicationClientIDStringForAVScanning[] = |
| const size_t kMaxMetaTagAttributeLength = 2000; |
| +#if defined(OS_WIN) |
| + |
| +namespace { |
| + |
| +base::string16 GetSuffixedRegistryPath(const wchar_t* suffix) { |
| + BrowserDistribution* chrome_distribution = |
|
Sigurður Ásgeirsson
2016/01/25 20:50:24
will this return the same constants as previously,
gab
2016/01/26 02:55:05
This will return the same constant as previously f
|
| + BrowserDistribution::GetDistribution(); |
| + DCHECK(chrome_distribution); |
| + DCHECK_EQ(BrowserDistribution::CHROME_BROWSER, |
| + chrome_distribution->GetType()); |
| + return chrome_distribution->GetRegistryPath() + suffix; |
| +} |
| + |
| +} // namespace |
| + |
| +base::string16 GetBrowserCrashDumpAttemptsRegistryPath() { |
| + return GetSuffixedRegistryPath(L"\\BrowserCrashDumpAttempts"); |
| +} |
| + |
| +base::string16 GetBrowserExitCodesRegistryPath() { |
| + return GetSuffixedRegistryPath(L"\\BrowserExitCodes"); |
| +} |
| + |
| +#endif // OS_WIN |
| + |
| } // namespace chrome |
| #undef FPL |