Chromium Code Reviews| 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/browser/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 } | 102 } |
| 103 #endif | 103 #endif |
| 104 | 104 |
| 105 namespace { | 105 namespace { |
| 106 | 106 |
| 107 // Add paths here to be included in chrome://chrome-urls/. | 107 // Add paths here to be included in chrome://chrome-urls/. |
| 108 // These paths will also be suggested by BuiltinProvider. | 108 // These paths will also be suggested by BuiltinProvider. |
| 109 const char* const kChromePaths[] = { | 109 const char* const kChromePaths[] = { |
| 110 chrome::kChromeUIAppCacheInternalsHost, | 110 chrome::kChromeUIAppCacheInternalsHost, |
| 111 chrome::kChromeUIBlobInternalsHost, | 111 chrome::kChromeUIBlobInternalsHost, |
| 112 chrome::kChromeUIBookmarksHost, | |
| 113 chrome::kChromeUICacheHost, | |
| 112 chrome::kChromeUIChromeURLsHost, | 114 chrome::kChromeUIChromeURLsHost, |
| 113 chrome::kChromeUICrashesHost, | 115 chrome::kChromeUICrashesHost, |
| 114 chrome::kChromeUICreditsHost, | 116 chrome::kChromeUICreditsHost, |
| 115 chrome::kChromeUIDNSHost, | 117 chrome::kChromeUIDNSHost, |
| 118 chrome::kChromeUIDownloadsHost, | |
| 119 chrome::kChromeUIExtensionsHost, | |
| 116 chrome::kChromeUIFlagsHost, | 120 chrome::kChromeUIFlagsHost, |
| 117 chrome::kChromeUIFlashHost, | 121 chrome::kChromeUIFlashHost, |
| 118 chrome::kChromeUIGpuInternalsHost, | 122 chrome::kChromeUIGpuHost, |
|
Peter Kasting
2011/07/12 23:37:28
Are these two "internals" URLs deprecated versions
msw
2011/07/13 00:11:08
Hmm, I guess the internals URLs are meant to super
| |
| 119 chrome::kChromeUIHistogramsHost, | 123 chrome::kChromeUIHistogramsHost, |
| 124 chrome::kChromeUIHistoryHost, | |
| 125 chrome::kChromeUIIPCHost, | |
| 120 chrome::kChromeUIMemoryHost, | 126 chrome::kChromeUIMemoryHost, |
| 121 chrome::kChromeUINetInternalsHost, | 127 chrome::kChromeUINetInternalsHost, |
| 122 chrome::kChromeUINetworkViewCacheHost, | 128 chrome::kChromeUINetworkViewCacheHost, |
| 129 chrome::kChromeUINewTabHost, | |
| 123 chrome::kChromeUIPluginsHost, | 130 chrome::kChromeUIPluginsHost, |
| 131 chrome::kChromeUIPrintHost, | |
| 132 chrome::kChromeUIQuotaInternalsHost, | |
| 133 chrome::kChromeUISessionsHost, | |
| 124 chrome::kChromeUISettingsHost, | 134 chrome::kChromeUISettingsHost, |
| 125 chrome::kChromeUIStatsHost, | 135 chrome::kChromeUIStatsHost, |
| 126 chrome::kChromeUISyncInternalsHost, | 136 chrome::kChromeUISyncHost, |
| 137 chrome::kChromeUITasksHost, | |
| 127 chrome::kChromeUITCMallocHost, | 138 chrome::kChromeUITCMallocHost, |
| 128 chrome::kChromeUITermsHost, | 139 chrome::kChromeUITermsHost, |
| 129 chrome::kChromeUIVersionHost, | 140 chrome::kChromeUIVersionHost, |
| 141 chrome::kChromeUIWorkersHost, | |
| 130 #ifdef TRACK_ALL_TASK_OBJECTS | 142 #ifdef TRACK_ALL_TASK_OBJECTS |
| 131 chrome::kChromeUITasksHost, | 143 chrome::kChromeUITasksHost, |
| 132 #endif | 144 #endif |
| 133 #if defined(OS_WIN) | 145 #if defined(OS_WIN) |
| 134 chrome::kChromeUIConflictsHost, | 146 chrome::kChromeUIConflictsHost, |
| 135 #endif | 147 #endif |
| 136 #if defined(OS_LINUX) | 148 #if defined(OS_LINUX) |
| 149 chrome::kChromeUILinuxProxyConfigHost, | |
| 137 chrome::kChromeUISandboxHost, | 150 chrome::kChromeUISandboxHost, |
| 138 #endif | 151 #endif |
| 139 #if defined(OS_CHROMEOS) | 152 #if defined(OS_CHROMEOS) |
| 153 chrome::kChromeUIActiveDownloadsHost, | |
| 154 chrome::kChromeUIChooseMobileNetworkHost, | |
| 155 chrome::kChromeUICryptohomeHost, | |
| 156 chrome::kChromeUIImageBurnerHost, | |
| 157 chrome::kChromeUIKeyboardOverlayHost, | |
| 158 chrome::kChromeUILoginHost, | |
| 140 chrome::kChromeUINetworkHost, | 159 chrome::kChromeUINetworkHost, |
| 141 chrome::kChromeUICryptohomeHost, | 160 chrome::kChromeUIOobeHost, |
| 142 chrome::kChromeUIOSCreditsHost, | 161 chrome::kChromeUIOSCreditsHost, |
| 162 chrome::kChromeUIProxySettingsHost, | |
| 163 chrome::kChromeUISystemInfoHost, | |
| 143 #endif | 164 #endif |
| 144 }; | 165 }; |
| 145 | 166 |
| 146 // Debug paths, presented without links in chrome://about. | 167 // Debug paths, presented without links in chrome://about. |
| 147 // These paths will not be suggested by BuiltinProvider. | 168 // These paths will not be suggested by BuiltinProvider. |
| 148 const char* const kDebugChromePaths[] = { | 169 const char* const kDebugChromePaths[] = { |
| 149 chrome::kChromeUICrashHost, | 170 chrome::kChromeUICrashHost, |
| 150 chrome::kChromeUIKillHost, | 171 chrome::kChromeUIKillHost, |
| 151 chrome::kChromeUIHangHost, | 172 chrome::kChromeUIHangHost, |
| 152 chrome::kChromeUIShorthangHost, | 173 chrome::kChromeUIShorthangHost, |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 387 | 408 |
| 388 void AppendFooter(std::string *output) { | 409 void AppendFooter(std::string *output) { |
| 389 output->append("</body>\n</html>\n"); | 410 output->append("</body>\n</html>\n"); |
| 390 } | 411 } |
| 391 | 412 |
| 392 std::string ChromeURLs() { | 413 std::string ChromeURLs() { |
| 393 std::string html; | 414 std::string html; |
| 394 AppendHeader(&html, 0, "Chrome URLs"); | 415 AppendHeader(&html, 0, "Chrome URLs"); |
| 395 AppendBody(&html); | 416 AppendBody(&html); |
| 396 html += "<h2>List of Chrome URLs</h2>\n<ul>\n"; | 417 html += "<h2>List of Chrome URLs</h2>\n<ul>\n"; |
| 418 std::string about_blank(chrome::kAboutBlankURL); | |
| 419 html += "<li><a href='" + about_blank + "/'>" + about_blank + "</a></li>\n"; | |
|
Peter Kasting
2011/07/12 23:37:28
I don't think about:blank is that useful, it just
msw
2011/07/13 00:11:08
Done.
| |
| 397 std::vector<std::string> paths(ChromePaths()); | 420 std::vector<std::string> paths(ChromePaths()); |
| 398 for (std::vector<std::string>::const_iterator i = paths.begin(); | 421 for (std::vector<std::string>::const_iterator i = paths.begin(); |
| 399 i != paths.end(); ++i) | 422 i != paths.end(); ++i) |
| 400 html += "<li><a href='chrome://" + *i + "/'>chrome://" + *i + "</a></li>\n"; | 423 html += "<li><a href='chrome://" + *i + "/'>chrome://" + *i + "</a></li>\n"; |
| 401 html += "</ul>\n<h2>For Debug</h2>\n" | 424 html += "</ul>\n<h2>For Debug</h2>\n" |
| 402 "<p>The following pages are for debugging purposes only. Because they " | 425 "<p>The following pages are for debugging purposes only. Because they " |
| 403 "crash or hang the renderer, they're not linked directly; you can type " | 426 "crash or hang the renderer, they're not linked directly; you can type " |
| 404 "them into the address bar if you need them.</p>\n<ul>"; | 427 "them into the address bar if you need them.</p>\n<ul>"; |
| 405 for (size_t i = 0; i < arraysize(kDebugChromePaths); i++) | 428 for (size_t i = 0; i < arraysize(kDebugChromePaths); i++) |
| 406 html += "<li>chrome://" + std::string(kDebugChromePaths[i]) + "</li>\n"; | 429 html += "<li>chrome://" + std::string(kDebugChromePaths[i]) + "</li>\n"; |
| (...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1473 return false; | 1496 return false; |
| 1474 } | 1497 } |
| 1475 | 1498 |
| 1476 std::vector<std::string> ChromePaths() { | 1499 std::vector<std::string> ChromePaths() { |
| 1477 std::vector<std::string> paths; | 1500 std::vector<std::string> paths; |
| 1478 paths.reserve(arraysize(kChromePaths)); | 1501 paths.reserve(arraysize(kChromePaths)); |
| 1479 for (size_t i = 0; i < arraysize(kChromePaths); i++) | 1502 for (size_t i = 0; i < arraysize(kChromePaths); i++) |
| 1480 paths.push_back(kChromePaths[i]); | 1503 paths.push_back(kChromePaths[i]); |
| 1481 return paths; | 1504 return paths; |
| 1482 } | 1505 } |
| OLD | NEW |