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

Unified Diff: net/base/mime_sniffer.cc

Issue 23064011: Consolidate scheme checks into an easy GURL method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/savable_resources.cc ('k') | net/base/network_change_notifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mime_sniffer.cc
diff --git a/net/base/mime_sniffer.cc b/net/base/mime_sniffer.cc
index cc83c7c3bda84a4377ed2f0aed31b474c73e0bfd..06034cb83d24abe147d1cb0cd0fab1ffcef78245 100644
--- a/net/base/mime_sniffer.cc
+++ b/net/base/mime_sniffer.cc
@@ -804,8 +804,7 @@ bool ShouldSniffMimeType(const GURL& url, const std::string& mime_type) {
UMASnifferHistogramGet("mime_sniffer.ShouldSniffMimeType2", 3);
}
bool sniffable_scheme = url.is_empty() ||
- url.SchemeIs("http") ||
- url.SchemeIs("https") ||
+ url.SchemeIsHTTPOrHTTPS() ||
url.SchemeIs("ftp") ||
#if defined(OS_ANDROID)
url.SchemeIs("content") ||
« no previous file with comments | « content/renderer/savable_resources.cc ('k') | net/base/network_change_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698