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

Unified Diff: webkit/browser/fileapi/sandbox_file_system_backend_delegate.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 | « url/gurl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc
diff --git a/webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc b/webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc
index 0a6034e7d9ace1706bd23db6e9ae43019122f2d0..bfd7fd896ed1214b7c3145ddc21a593b2204b6be 100644
--- a/webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc
+++ b/webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc
@@ -181,7 +181,7 @@ bool SandboxFileSystemBackendDelegate::IsAccessValid(
bool SandboxFileSystemBackendDelegate::IsAllowedScheme(const GURL& url) const {
// Basically we only accept http or https. We allow file:// URLs
// only if --allow-file-access-from-files flag is given.
- if (url.SchemeIs("http") || url.SchemeIs("https"))
+ if (url.SchemeIsHTTPOrHTTPS())
return true;
if (url.SchemeIsFileSystem())
return url.inner_url() && IsAllowedScheme(*url.inner_url());
« no previous file with comments | « url/gurl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698