Index: chrome/browser/devtools/devtools_ui_bindings.cc |
diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc |
index 7fddff1f0222ae2d6c4bbbbb0163dbcd8b038b7e..d86ecd9bb1da4ff7b3427035ef2396a6e6574fe7 100644 |
--- a/chrome/browser/devtools/devtools_ui_bindings.cc |
+++ b/chrome/browser/devtools/devtools_ui_bindings.cc |
@@ -652,7 +652,10 @@ void DevToolsUIBindings::LoadNetworkResource(const DispatchCallback& callback, |
const std::string& headers, |
int stream_id) { |
GURL gurl(url); |
- if (!gurl.is_valid()) { |
+ bool schemeIsAllowed = gurl.is_valid() && |
+ (gurl.SchemeIs(url::kHttpScheme) || gurl.SchemeIs(url::kHttpsScheme) || |
+ gurl.SchemeIs(url::kDataScheme) || gurl.SchemeIs(url::kFtpScheme)); |
+ if (!gurl.is_valid() || !schemeIsAllowed) { |
base::DictionaryValue response; |
response.SetInteger("statusCode", 404); |
callback.Run(&response); |