summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/isolated_file_util.cc
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-30 08:36:55 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-30 08:36:55 +0000
commitd65c8215eae22236f282a98df358a27a8f7babb2 (patch)
treefcd939beb3c43c4b92412ab19da93f27c22dbdef /webkit/fileapi/isolated_file_util.cc
parentc793bcce64a56fd55c3ba2a69a716aca3c6abef8 (diff)
downloadchromium_src-d65c8215eae22236f282a98df358a27a8f7babb2.zip
chromium_src-d65c8215eae22236f282a98df358a27a8f7babb2.tar.gz
chromium_src-d65c8215eae22236f282a98df358a27a8f7babb2.tar.bz2
Remove ugly writable flags from IsolatedContext
For regular chrome centralize the read/write permission to ChildProcessSecurityPolicy and do nothing in fileapi layer. For DRT/content_shell disable writes at SimpleFileSystem layer as well as we do in FileAPIMessageFilter for chrome. BUG=none TEST=existing tests TEST=layout tests https://bugs.webkit.org/show_bug.cgi?id=89981 Review URL: https://chromiumcodereview.appspot.com/10692005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145063 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/isolated_file_util.cc')
-rw-r--r--webkit/fileapi/isolated_file_util.cc16
1 files changed, 2 insertions, 14 deletions
diff --git a/webkit/fileapi/isolated_file_util.cc b/webkit/fileapi/isolated_file_util.cc
index bb145b6..6c0bf6a 100644
--- a/webkit/fileapi/isolated_file_util.cc
+++ b/webkit/fileapi/isolated_file_util.cc
@@ -280,7 +280,7 @@ PlatformFileError IsolatedFileUtil::Touch(
const base::Time& last_access_time,
const base::Time& last_modified_time) {
FilePath platform_path;
- if (!GetPlatformPathForWrite(url, &platform_path) || platform_path.empty())
+ if (!GetPlatformPath(url, &platform_path) || platform_path.empty())
return base::PLATFORM_FILE_ERROR_SECURITY;
return NativeFileUtil::Touch(
platform_path, last_access_time, last_modified_time);
@@ -291,7 +291,7 @@ PlatformFileError IsolatedFileUtil::Truncate(
const FileSystemURL& url,
int64 length) {
FilePath platform_path;
- if (!GetPlatformPathForWrite(url, &platform_path) || platform_path.empty())
+ if (!GetPlatformPath(url, &platform_path) || platform_path.empty())
return base::PLATFORM_FILE_ERROR_SECURITY;
return NativeFileUtil::Truncate(platform_path, length);
}
@@ -380,16 +380,4 @@ bool IsolatedFileUtil::GetPlatformPath(const FileSystemURL& url,
return true;
}
-bool IsolatedFileUtil::GetPlatformPathForWrite(
- const FileSystemURL& url,
- FilePath* platform_path) const {
- DCHECK(platform_path);
- std::string filesystem_id;
- FilePath root_path;
- if (!IsolatedContext::GetInstance()->CrackIsolatedPath(
- url.path(), &filesystem_id, &root_path, platform_path))
- return false;
- return IsolatedContext::GetInstance()->IsWritable(filesystem_id);
-}
-
} // namespace