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

Unified Diff: webkit/fileapi/file_system_path_manager.cc

Issue 7811006: Add full support for filesystem URLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better content_settings_pattern.cc changes. Created 9 years 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: webkit/fileapi/file_system_path_manager.cc
diff --git a/webkit/fileapi/file_system_path_manager.cc b/webkit/fileapi/file_system_path_manager.cc
index 92681064e4b3c288cd0c6677a9a01086f1d7d539..2804437ead691d43a71620ec02f5c89f3f6cfd9c 100644
--- a/webkit/fileapi/file_system_path_manager.cc
+++ b/webkit/fileapi/file_system_path_manager.cc
@@ -100,11 +100,14 @@ FilePath FileSystemPathManager::ValidateFileSystemRootAndGetPathOnFileThread(
}
bool FileSystemPathManager::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.
+ // Basically we only accept http, https, or extensions. We allow file:// URLs
+ // only if --allow-file-access-from-files flag is given. And we allow
+ // filesystem: urls if the URL's inner scheme is one we allow.
return url.SchemeIs("http") || url.SchemeIs("https") ||
url.SchemeIs(kExtensionScheme) || url.SchemeIs(kChromeScheme) ||
- (url.SchemeIsFile() && allow_file_access_from_files_);
+ (url.SchemeIsFile() && allow_file_access_from_files_) ||
+ (url.SchemeIsFileSystem() && url.inner_url() &&
+ IsAllowedScheme(*url.inner_url()));
}
// static

Powered by Google App Engine
This is Rietveld 408576698