| 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 "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 { | 9 namespace { |
| 10 const char* kSavableSchemes[] = { | 10 const char* kSavableSchemes[] = { |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 kChromeUIHangURL, | 411 kChromeUIHangURL, |
| 412 kChromeUIShorthangURL, | 412 kChromeUIShorthangURL, |
| 413 kChromeUIGpuCleanURL, | 413 kChromeUIGpuCleanURL, |
| 414 kChromeUIGpuCrashURL, | 414 kChromeUIGpuCrashURL, |
| 415 kChromeUIGpuHangURL, | 415 kChromeUIGpuHangURL, |
| 416 }; | 416 }; |
| 417 int kNumberOfChromeDebugURLs = static_cast<int>(arraysize(kChromeDebugURLs)); | 417 int kNumberOfChromeDebugURLs = static_cast<int>(arraysize(kChromeDebugURLs)); |
| 418 | 418 |
| 419 const char kExtensionScheme[] = "chrome-extension"; | 419 const char kExtensionScheme[] = "chrome-extension"; |
| 420 | 420 |
| 421 void RegisterChromeSchemes() { | 421 void GetAdditionalSchemes( |
| 422 url_util::AddStandardScheme(kExtensionScheme); | 422 std::vector<std::string>* standard_schemes, |
| 423 std::vector<std::string>* savable_schemes) { |
| 424 standard_schemes->push_back(kExtensionScheme); |
| 423 #if defined(OS_CHROMEOS) | 425 #if defined(OS_CHROMEOS) |
| 424 url_util::AddStandardScheme(kCrosScheme); | 426 standard_schemes->push_back(kCrosScheme); |
| 425 #endif | 427 #endif |
| 426 | 428 |
| 427 // This call will also lock the list of standard schemes. | 429 int i = 0; |
| 428 content::RegisterContentSchemes(kSavableSchemes); | 430 while (kSavableSchemes[i]) { |
| 431 savable_schemes->push_back(std::string(kSavableSchemes[i])); |
| 432 ++i; |
| 433 } |
| 429 } | 434 } |
| 430 | 435 |
| 431 } // namespace chrome | 436 } // namespace chrome |
| OLD | NEW |