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

Unified Diff: content/browser/frame_host/debug_urls.cc

Issue 151593004: Fix bugs with renderer-side debug URLs, like chrome://crash or javascript:. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clarify comments. Created 6 years, 11 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
« no previous file with comments | « content/browser/frame_host/debug_urls.h ('k') | content/browser/frame_host/navigation_controller_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/debug_urls.cc
diff --git a/content/browser/frame_host/debug_urls.cc b/content/browser/frame_host/debug_urls.cc
index 3322e51a20f0931c78e240515a7d50486ee26a63..4e9d49d32a3d7be43ab7cb5b882f1cfd17c3d0d7 100644
--- a/content/browser/frame_host/debug_urls.cc
+++ b/content/browser/frame_host/debug_urls.cc
@@ -80,4 +80,17 @@ bool HandleDebugURL(const GURL& url, PageTransition transition) {
return false;
}
+bool IsRendererDebugURL(const GURL& url) {
+ if (!url.is_valid())
+ return false;
+
+ if (url.SchemeIs(kJavaScriptScheme))
+ return true;
+
+ return url == GURL(kChromeUICrashURL) ||
+ url == GURL(kChromeUIKillURL) ||
+ url == GURL(kChromeUIHangURL) ||
+ url == GURL(kChromeUIShorthangURL);
+}
+
} // namespace content
« no previous file with comments | « content/browser/frame_host/debug_urls.h ('k') | content/browser/frame_host/navigation_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698