| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/common/url_constants.h" | 5 #include "chrome/common/url_constants.h" |
| 6 | 6 |
| 7 #include "googleurl/src/url_util.h" | 7 #include "googleurl/src/url_util.h" |
| 8 | 8 |
| 9 namespace chrome { | 9 namespace chrome { |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 const char kChromeUICrashesURL[] = "chrome://crashes/"; | 28 const char kChromeUICrashesURL[] = "chrome://crashes/"; |
| 29 const char kChromeUICrashURL[] = "chrome://crash/"; | 29 const char kChromeUICrashURL[] = "chrome://crash/"; |
| 30 const char kChromeUICreditsURL[] = "chrome://credits/"; | 30 const char kChromeUICreditsURL[] = "chrome://credits/"; |
| 31 const char kChromeUIDevToolsURL[] = "chrome-devtools://devtools/"; | 31 const char kChromeUIDevToolsURL[] = "chrome-devtools://devtools/"; |
| 32 const char kChromeUIDownloadsURL[] = "chrome://downloads/"; | 32 const char kChromeUIDownloadsURL[] = "chrome://downloads/"; |
| 33 const char kChromeUIExtensionIconURL[] = "chrome://extension-icon/"; | 33 const char kChromeUIExtensionIconURL[] = "chrome://extension-icon/"; |
| 34 const char kChromeUIExtensionsURL[] = "chrome://extensions/"; | 34 const char kChromeUIExtensionsURL[] = "chrome://extensions/"; |
| 35 const char kChromeUIFaviconURL[] = "chrome://favicon/"; | 35 const char kChromeUIFaviconURL[] = "chrome://favicon/"; |
| 36 const char kChromeUIFlagsURL[] = "chrome://flags/"; | 36 const char kChromeUIFlagsURL[] = "chrome://flags/"; |
| 37 const char kChromeUIFlashURL[] = "chrome://flash/"; | 37 const char kChromeUIFlashURL[] = "chrome://flash/"; |
| 38 const char kChromeUIGpuCleanURL[] = "chrome://gpuclean"; |
| 38 const char kChromeUIGpuCrashURL[] = "chrome://gpucrash"; | 39 const char kChromeUIGpuCrashURL[] = "chrome://gpucrash"; |
| 40 const char kChromeUIGpuHangURL[] = "chrome://gpuhang"; |
| 39 const char kChromeUIHangURL[] = "chrome://hang/"; | 41 const char kChromeUIHangURL[] = "chrome://hang/"; |
| 40 const char kChromeUIHistory2URL[] = "chrome://history2/"; | 42 const char kChromeUIHistory2URL[] = "chrome://history2/"; |
| 41 const char kChromeUIHistoryURL[] = "chrome://history/"; | 43 const char kChromeUIHistoryURL[] = "chrome://history/"; |
| 42 const char kChromeUIIPCURL[] = "chrome://ipc/"; | 44 const char kChromeUIIPCURL[] = "chrome://ipc/"; |
| 43 const char kChromeUIKeyboardURL[] = "chrome://keyboard/"; | 45 const char kChromeUIKeyboardURL[] = "chrome://keyboard/"; |
| 44 const char kChromeUIKillURL[] = "chrome://kill/"; | 46 const char kChromeUIKillURL[] = "chrome://kill/"; |
| 45 const char kChromeUIMemoryURL[] = "chrome://memory/"; | 47 const char kChromeUIMemoryURL[] = "chrome://memory/"; |
| 46 const char kChromeUIMemoryRedirectURL[] = "chrome://memory-redirect/"; | 48 const char kChromeUIMemoryRedirectURL[] = "chrome://memory-redirect/"; |
| 47 const char kChromeUINetworkViewCacheURL[] = "chrome://view-http-cache/"; | 49 const char kChromeUINetworkViewCacheURL[] = "chrome://view-http-cache/"; |
| 48 const char kChromeUINetInternalsURL[] = "chrome://net-internals/"; | 50 const char kChromeUINetInternalsURL[] = "chrome://net-internals/"; |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 "https://www.google.com/support/chrome/bin/answer.py?answer=1331723"; | 280 "https://www.google.com/support/chrome/bin/answer.py?answer=1331723"; |
| 279 | 281 |
| 280 const char kLearnMoreRegisterProtocolHandlerURL[] = | 282 const char kLearnMoreRegisterProtocolHandlerURL[] = |
| 281 "http://www.google.com/support/chrome/bin/answer.py?answer=1382847"; | 283 "http://www.google.com/support/chrome/bin/answer.py?answer=1382847"; |
| 282 | 284 |
| 283 #if defined(OS_CHROMEOS) | 285 #if defined(OS_CHROMEOS) |
| 284 const char kCloudPrintLearnMoreURL[] = | 286 const char kCloudPrintLearnMoreURL[] = |
| 285 "https://www.google.com/support/chromeos/bin/topic.py?topic=29023"; | 287 "https://www.google.com/support/chromeos/bin/topic.py?topic=29023"; |
| 286 #endif | 288 #endif |
| 287 | 289 |
| 290 const char* const kChromeDebugURLs[] = { |
| 291 kChromeUICrashURL, |
| 292 kChromeUIKillURL, |
| 293 kChromeUIHangURL, |
| 294 kChromeUIShorthangURL, |
| 295 kChromeUIGpuCleanURL, |
| 296 kChromeUIGpuCrashURL, |
| 297 kChromeUIGpuHangURL, |
| 298 }; |
| 299 int kNumberOfChromeDebugURLs = static_cast<int>(arraysize(kChromeDebugURLs)); |
| 300 |
| 288 void RegisterChromeSchemes() { | 301 void RegisterChromeSchemes() { |
| 289 // Don't need "chrome-internal" which was used in old versions of Chrome for | 302 // Don't need "chrome-internal" which was used in old versions of Chrome for |
| 290 // the new tab page. | 303 // the new tab page. |
| 291 url_util::AddStandardScheme(kChromeDevToolsScheme); | 304 url_util::AddStandardScheme(kChromeDevToolsScheme); |
| 292 url_util::AddStandardScheme(kChromeUIScheme); | 305 url_util::AddStandardScheme(kChromeUIScheme); |
| 293 url_util::AddStandardScheme(kExtensionScheme); | 306 url_util::AddStandardScheme(kExtensionScheme); |
| 294 url_util::AddStandardScheme(kMetadataScheme); | 307 url_util::AddStandardScheme(kMetadataScheme); |
| 295 #if defined(OS_CHROMEOS) | 308 #if defined(OS_CHROMEOS) |
| 296 url_util::AddStandardScheme(kCrosScheme); | 309 url_util::AddStandardScheme(kCrosScheme); |
| 297 #endif | 310 #endif |
| 298 | 311 |
| 299 // Prevent future modification of the standard schemes list. This is to | 312 // Prevent future modification of the standard schemes list. This is to |
| 300 // prevent accidental creation of data races in the program. AddStandardScheme | 313 // prevent accidental creation of data races in the program. AddStandardScheme |
| 301 // isn't threadsafe so must be called when GURL isn't used on any other | 314 // isn't threadsafe so must be called when GURL isn't used on any other |
| 302 // thread. This is really easy to mess up, so we say that all calls to | 315 // thread. This is really easy to mess up, so we say that all calls to |
| 303 // AddStandardScheme in Chrome must be inside this function. | 316 // AddStandardScheme in Chrome must be inside this function. |
| 304 url_util::LockStandardSchemes(); | 317 url_util::LockStandardSchemes(); |
| 305 } | 318 } |
| 306 | 319 |
| 307 } // namespace chrome | 320 } // namespace chrome |
| OLD | NEW |