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

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: Add tests 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
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);
nasko 2014/01/31 23:56:07 Shouldn't that list include the rest of the ones p
Charlie Reis 2014/01/31 23:59:22 No, there's a distinction between those 7 (which a
nasko 2014/02/01 00:05:05 Ah, that makes sense. Thanks!
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698