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

Unified Diff: webkit/chromeos/fileapi/cros_mount_point_provider.cc

Issue 10879002: kFileSystemTypeIsolated should be only used in the URL exposed to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 8 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/browser/fileapi/fileapi_message_filter.cc ('k') | webkit/fileapi/file_system_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/chromeos/fileapi/cros_mount_point_provider.cc
diff --git a/webkit/chromeos/fileapi/cros_mount_point_provider.cc b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
index ff5b40183dbadb948f5ef8a3666e9845c952c258..79642c4164597b2424345dedc015d8662e952e6d 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.cc
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
@@ -65,8 +65,8 @@ void CrosMountPointProvider::ValidateFileSystemRoot(
fileapi::FileSystemType type,
bool create,
const ValidateFileSystemCallback& callback) {
+ DCHECK(fileapi::IsolatedContext::IsIsolatedType(type));
// Nothing to validate for external filesystem.
- DCHECK(type == fileapi::kFileSystemTypeExternal);
callback.Run(base::PLATFORM_FILE_OK);
}
@@ -75,7 +75,7 @@ FilePath CrosMountPointProvider::GetFileSystemRootPathOnFileThread(
fileapi::FileSystemType type,
const FilePath& virtual_path,
bool create) {
- DCHECK(type == fileapi::kFileSystemTypeExternal);
+ DCHECK(fileapi::IsolatedContext::IsIsolatedType(type));
fileapi::FileSystemURL url(origin_url, type, virtual_path);
if (!url.is_valid())
return FilePath();
@@ -89,12 +89,13 @@ FilePath CrosMountPointProvider::GetFileSystemRootPathOnFileThread(
bool CrosMountPointProvider::IsAccessAllowed(
const fileapi::FileSystemURL& url) {
- // TODO(kinuko): this should call CanHandleURL() once
- // http://crbug.com/142267 is fixed.
- if (url.type() != fileapi::kFileSystemTypeNativeLocal &&
- url.type() != fileapi::kFileSystemTypeDrive)
+ if (!CanHandleURL(url))
return false;
+ // No extra check is needed for isolated file systems.
+ if (url.mount_type() == fileapi::kFileSystemTypeIsolated)
+ return true;
+
// Permit access to mount points from internal WebUI.
const GURL& origin_url = url.origin();
if (origin_url.SchemeIs(kChromeUIScheme))
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.cc ('k') | webkit/fileapi/file_system_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698