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

Unified Diff: content/browser/browser_url_handler.cc

Issue 9349010: Move handling of debug urls like chrome://crash, chrome://gpuclean to content. These are for test... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_url_handler.cc
===================================================================
--- content/browser/browser_url_handler.cc (revision 120733)
+++ content/browser/browser_url_handler.cc (working copy)
@@ -59,6 +59,15 @@
return true;
}
+static bool HandleDebugUrl(GURL* url,
+ content::BrowserContext* browser_context) {
+ // Circumvent processing URLs that the renderer process will handle.
+ return *url == GURL(chrome::kChromeUICrashURL) ||
+ *url == GURL(chrome::kChromeUIHangURL) ||
+ *url == GURL(chrome::kChromeUIKillURL) ||
+ *url == GURL(chrome::kChromeUIShorthangURL);
+}
+
// static
BrowserURLHandler* BrowserURLHandler::GetInstance() {
return Singleton<BrowserURLHandler>::get();
@@ -77,6 +86,8 @@
}
BrowserURLHandler::BrowserURLHandler() {
+ AddHandlerPair(&HandleDebugUrl, BrowserURLHandler::null_handler());
+
content::GetContentClient()->browser()->BrowserURLHandlerCreated(this);
// view-source:

Powered by Google App Engine
This is Rietveld 408576698