Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 #include "chrome/common/chrome_constants.h" | 6 #include "chrome/common/chrome_constants.h" |
| 7 #include "chrome/common/chrome_version.h" | 7 #include "chrome/common/chrome_version.h" |
| 8 | 8 |
| 9 #if defined(OS_WIN) | |
| 10 #include "chrome/installer/util/browser_distribution.h" | |
| 11 #endif | |
| 12 | |
| 9 #define FPL FILE_PATH_LITERAL | 13 #define FPL FILE_PATH_LITERAL |
| 10 | 14 |
| 11 #if defined(OS_MACOSX) | 15 #if defined(OS_MACOSX) |
| 12 #define CHROMIUM_PRODUCT_STRING "Chromium" | 16 #define CHROMIUM_PRODUCT_STRING "Chromium" |
| 13 #if defined(GOOGLE_CHROME_BUILD) | 17 #if defined(GOOGLE_CHROME_BUILD) |
| 14 #define PRODUCT_STRING "Google Chrome" | 18 #define PRODUCT_STRING "Google Chrome" |
| 15 #elif defined(CHROMIUM_BUILD) | 19 #elif defined(CHROMIUM_BUILD) |
| 16 #define PRODUCT_STRING "Chromium" | 20 #define PRODUCT_STRING "Chromium" |
| 17 #else | 21 #else |
| 18 #error Unknown branding | 22 #error Unknown branding |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 200 #if defined(OS_LINUX) | 204 #if defined(OS_LINUX) |
| 201 const int kLowestRendererOomScore = 300; | 205 const int kLowestRendererOomScore = 300; |
| 202 const int kHighestRendererOomScore = 1000; | 206 const int kHighestRendererOomScore = 1000; |
| 203 #endif | 207 #endif |
| 204 | 208 |
| 205 #if defined(OS_WIN) | 209 #if defined(OS_WIN) |
| 206 const wchar_t kMetroNavigationAndSearchMessage[] = | 210 const wchar_t kMetroNavigationAndSearchMessage[] = |
| 207 L"CHROME_METRO_NAV_SEARCH_REQUEST"; | 211 L"CHROME_METRO_NAV_SEARCH_REQUEST"; |
| 208 const wchar_t kMetroGetCurrentTabInfoMessage[] = | 212 const wchar_t kMetroGetCurrentTabInfoMessage[] = |
| 209 L"CHROME_METRO_GET_CURRENT_TAB_INFO"; | 213 L"CHROME_METRO_GET_CURRENT_TAB_INFO"; |
| 210 // This is used by breakpad and the metrics reporting. | |
| 211 const wchar_t kBrowserCrashDumpAttemptsRegistryPath[] = | |
| 212 L"Software\\" PRODUCT_STRING_PATH L"\\BrowserCrashDumpAttempts"; | |
| 213 const wchar_t kBrowserCrashDumpAttemptsRegistryPathSxS[] = | |
| 214 L"Software\\" PRODUCT_STRING_PATH L"\\BrowserCrashDumpAttemptsSxS"; | |
| 215 // This is used by browser exit code metrics reporting. | |
| 216 const wchar_t kBrowserExitCodesRegistryPath[] = | |
| 217 L"Software\\" PRODUCT_STRING_PATH L"\\BrowserExitCodes"; | |
| 218 #endif | 214 #endif |
| 219 | 215 |
| 220 #if defined(OS_CHROMEOS) | 216 #if defined(OS_CHROMEOS) |
| 221 const char kProfileDirPrefix[] = "u-"; | 217 const char kProfileDirPrefix[] = "u-"; |
| 222 const char kLegacyProfileDir[] = "user"; | 218 const char kLegacyProfileDir[] = "user"; |
| 223 const char kTestUserProfileDir[] = "test-user"; | 219 const char kTestUserProfileDir[] = "test-user"; |
| 224 #endif | 220 #endif |
| 225 | 221 |
| 226 // This GUID is associated with any 'don't ask me again' settings that the | 222 // This GUID is associated with any 'don't ask me again' settings that the |
| 227 // user can select for different file types. | 223 // user can select for different file types. |
| 228 // {2676A9A2-D919-4FEE-9187-152100393AB2} | 224 // {2676A9A2-D919-4FEE-9187-152100393AB2} |
| 229 const char kApplicationClientIDStringForAVScanning[] = | 225 const char kApplicationClientIDStringForAVScanning[] = |
| 230 "2676A9A2-D919-4FEE-9187-152100393AB2"; | 226 "2676A9A2-D919-4FEE-9187-152100393AB2"; |
| 231 | 227 |
| 232 const size_t kMaxMetaTagAttributeLength = 2000; | 228 const size_t kMaxMetaTagAttributeLength = 2000; |
| 233 | 229 |
| 230 #if defined(OS_WIN) | |
| 231 | |
| 232 namespace { | |
| 233 | |
| 234 base::string16 GetSuffixedRegistryPath(const wchar_t* suffix) { | |
| 235 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
| |
| 236 BrowserDistribution::GetDistribution(); | |
| 237 DCHECK(chrome_distribution); | |
| 238 DCHECK_EQ(BrowserDistribution::CHROME_BROWSER, | |
| 239 chrome_distribution->GetType()); | |
| 240 return chrome_distribution->GetRegistryPath() + suffix; | |
| 241 } | |
| 242 | |
| 243 } // namespace | |
| 244 | |
| 245 base::string16 GetBrowserCrashDumpAttemptsRegistryPath() { | |
| 246 return GetSuffixedRegistryPath(L"\\BrowserCrashDumpAttempts"); | |
| 247 } | |
| 248 | |
| 249 base::string16 GetBrowserExitCodesRegistryPath() { | |
| 250 return GetSuffixedRegistryPath(L"\\BrowserExitCodes"); | |
| 251 } | |
| 252 | |
| 253 #endif // OS_WIN | |
| 254 | |
| 234 } // namespace chrome | 255 } // namespace chrome |
| 235 | 256 |
| 236 #undef FPL | 257 #undef FPL |
| OLD | NEW |