Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: chrome/browser/browser_about_handler.cc

Issue 7689003: Don't do Instant previews of chrome://crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Centralize debug URLs Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/instant/instant_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 chrome::kChromeUIKeyboardOverlayHost, 161 chrome::kChromeUIKeyboardOverlayHost,
162 chrome::kChromeUILoginHost, 162 chrome::kChromeUILoginHost,
163 chrome::kChromeUINetworkHost, 163 chrome::kChromeUINetworkHost,
164 chrome::kChromeUIOobeHost, 164 chrome::kChromeUIOobeHost,
165 chrome::kChromeUIOSCreditsHost, 165 chrome::kChromeUIOSCreditsHost,
166 chrome::kChromeUIProxySettingsHost, 166 chrome::kChromeUIProxySettingsHost,
167 chrome::kChromeUISystemInfoHost, 167 chrome::kChromeUISystemInfoHost,
168 #endif 168 #endif
169 }; 169 };
170 170
171 // Debug paths, presented without links in chrome://about.
172 // These paths will not be suggested by BuiltinProvider.
173 const char* const kDebugChromePaths[] = {
174 chrome::kChromeUICrashHost,
175 chrome::kChromeUIKillHost,
176 chrome::kChromeUIHangHost,
177 chrome::kChromeUIShorthangHost,
178 chrome::kChromeUIGpuCleanHost,
179 chrome::kChromeUIGpuCrashHost,
180 chrome::kChromeUIGpuHangHost
181 };
182
183 // AboutSource handles these chrome:// paths. 171 // AboutSource handles these chrome:// paths.
184 const char* const kAboutSourceNames[] = { 172 const char* const kAboutSourceNames[] = {
185 chrome::kChromeUIChromeURLsHost, 173 chrome::kChromeUIChromeURLsHost,
186 chrome::kChromeUICreditsHost, 174 chrome::kChromeUICreditsHost,
187 chrome::kChromeUIDNSHost, 175 chrome::kChromeUIDNSHost,
188 chrome::kChromeUIHistogramsHost, 176 chrome::kChromeUIHistogramsHost,
189 chrome::kChromeUIMemoryHost, 177 chrome::kChromeUIMemoryHost,
190 chrome::kChromeUIMemoryRedirectHost, 178 chrome::kChromeUIMemoryRedirectHost,
191 chrome::kChromeUIStatsHost, 179 chrome::kChromeUIStatsHost,
192 chrome::kChromeUITermsHost, 180 chrome::kChromeUITermsHost,
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 AppendBody(&html); 423 AppendBody(&html);
436 html += "<h2>List of Chrome URLs</h2>\n<ul>\n"; 424 html += "<h2>List of Chrome URLs</h2>\n<ul>\n";
437 std::vector<std::string> paths(ChromePaths()); 425 std::vector<std::string> paths(ChromePaths());
438 for (std::vector<std::string>::const_iterator i = paths.begin(); 426 for (std::vector<std::string>::const_iterator i = paths.begin();
439 i != paths.end(); ++i) 427 i != paths.end(); ++i)
440 html += "<li><a href='chrome://" + *i + "/'>chrome://" + *i + "</a></li>\n"; 428 html += "<li><a href='chrome://" + *i + "/'>chrome://" + *i + "</a></li>\n";
441 html += "</ul>\n<h2>For Debug</h2>\n" 429 html += "</ul>\n<h2>For Debug</h2>\n"
442 "<p>The following pages are for debugging purposes only. Because they " 430 "<p>The following pages are for debugging purposes only. Because they "
443 "crash or hang the renderer, they're not linked directly; you can type " 431 "crash or hang the renderer, they're not linked directly; you can type "
444 "them into the address bar if you need them.</p>\n<ul>"; 432 "them into the address bar if you need them.</p>\n<ul>";
445 for (size_t i = 0; i < arraysize(kDebugChromePaths); i++) 433 for (int i = 0; i < chrome::kNumberOfChromeDebugURLs; i++)
446 html += "<li>chrome://" + std::string(kDebugChromePaths[i]) + "</li>\n"; 434 html += "<li>" + std::string(chrome::kChromeDebugURLs[i]) + "</li>\n";
447 html += "</ul>\n"; 435 html += "</ul>\n";
448 AppendFooter(&html); 436 AppendFooter(&html);
449 return html; 437 return html;
450 } 438 }
451 439
452 #if defined(OS_CHROMEOS) 440 #if defined(OS_CHROMEOS)
453 441
454 // Html output helper functions 442 // Html output helper functions
455 // TODO(stevenjb): L10N this. 443 // TODO(stevenjb): L10N this.
456 444
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1529 return false; 1517 return false;
1530 } 1518 }
1531 1519
1532 std::vector<std::string> ChromePaths() { 1520 std::vector<std::string> ChromePaths() {
1533 std::vector<std::string> paths; 1521 std::vector<std::string> paths;
1534 paths.reserve(arraysize(kChromePaths)); 1522 paths.reserve(arraysize(kChromePaths));
1535 for (size_t i = 0; i < arraysize(kChromePaths); i++) 1523 for (size_t i = 0; i < arraysize(kChromePaths); i++)
1536 paths.push_back(kChromePaths[i]); 1524 paths.push_back(kChromePaths[i]);
1537 return paths; 1525 return paths;
1538 } 1526 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/instant/instant_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698