| 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/browser/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> |
| 7 #include <string> | 8 #include <string> |
| 8 | 9 |
| 9 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 11 #include "base/logging.h" |
| 11 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
| 12 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 13 #include "chrome/browser/net/url_fixer_upper.h" | 14 #include "chrome/browser/net/url_fixer_upper.h" |
| 14 #include "chrome/browser/ui/browser_dialogs.h" | 15 #include "chrome/browser/ui/browser_dialogs.h" |
| 15 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 16 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.h" |
| 17 | 18 |
| 18 namespace { | 19 namespace { |
| 19 | 20 |
| 20 // Add paths here to be included in chrome://chrome-urls (about:about). | 21 // Add paths here to be included in chrome://chrome-urls (about:about). |
| 21 // These paths will also be suggested by BuiltinProvider. | 22 // These paths will also be suggested by BuiltinProvider. |
| 22 const char* const kChromePaths[] = { | 23 const char* const kPaths[] = { |
| 23 chrome::kChromeUIAppCacheInternalsHost, | 24 chrome::kChromeUIAppCacheInternalsHost, |
| 24 chrome::kChromeUIBlobInternalsHost, | 25 chrome::kChromeUIBlobInternalsHost, |
| 25 chrome::kChromeUIBookmarksHost, | 26 chrome::kChromeUIBookmarksHost, |
| 26 chrome::kChromeUICacheHost, | 27 chrome::kChromeUICacheHost, |
| 27 chrome::kChromeUIChromeURLsHost, | 28 chrome::kChromeUIChromeURLsHost, |
| 28 chrome::kChromeUICrashesHost, | 29 chrome::kChromeUICrashesHost, |
| 29 chrome::kChromeUICreditsHost, | 30 chrome::kChromeUICreditsHost, |
| 30 chrome::kChromeUIDNSHost, | 31 chrome::kChromeUIDNSHost, |
| 31 chrome::kChromeUIDownloadsHost, | 32 chrome::kChromeUIDownloadsHost, |
| 32 chrome::kChromeUIExtensionsHost, | 33 chrome::kChromeUIExtensionsHost, |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 return true; | 158 return true; |
| 158 } | 159 } |
| 159 #endif | 160 #endif |
| 160 | 161 |
| 161 #endif // OFFICIAL_BUILD | 162 #endif // OFFICIAL_BUILD |
| 162 | 163 |
| 163 return false; | 164 return false; |
| 164 } | 165 } |
| 165 | 166 |
| 166 std::vector<std::string> ChromePaths() { | 167 std::vector<std::string> ChromePaths() { |
| 167 std::vector<std::string> paths; | 168 std::vector<std::string> paths(kPaths, kPaths + arraysize(kPaths)); |
| 168 paths.reserve(arraysize(kChromePaths)); | 169 std::sort(paths.begin(), paths.end()); |
| 169 for (size_t i = 0; i < arraysize(kChromePaths); i++) | |
| 170 paths.push_back(kChromePaths[i]); | |
| 171 return paths; | 170 return paths; |
| 172 } | 171 } |
| OLD | NEW |