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

Unified Diff: webkit/tools/test_shell/simple_file_system.cc

Issue 11787028: New FileSystemURL cracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Couple of nits I noticed Created 7 years, 11 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
Index: webkit/tools/test_shell/simple_file_system.cc
diff --git a/webkit/tools/test_shell/simple_file_system.cc b/webkit/tools/test_shell/simple_file_system.cc
index 8bfc0b7900a59086a2b1e0c2f679d4e99067f422..aace922226b695175bf2017084663aaf7a1014a0 100644
--- a/webkit/tools/test_shell/simple_file_system.cc
+++ b/webkit/tools/test_shell/simple_file_system.cc
@@ -123,8 +123,8 @@ void SimpleFileSystem::DeleteFileSystem(
void SimpleFileSystem::move(
const WebURL& src_path,
const WebURL& dest_path, WebFileSystemCallbacks* callbacks) {
- FileSystemURL src_url(src_path);
- FileSystemURL dest_url(dest_path);
+ FileSystemURL src_url(file_system_context()->CrackURL(src_path));
+ FileSystemURL dest_url(file_system_context()->CrackURL(dest_path));
if (!HasFilePermission(src_url, FILE_PERMISSION_WRITE) ||
!HasFilePermission(dest_url, FILE_PERMISSION_CREATE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
@@ -137,8 +137,8 @@ void SimpleFileSystem::move(
void SimpleFileSystem::copy(
const WebURL& src_path, const WebURL& dest_path,
WebFileSystemCallbacks* callbacks) {
- FileSystemURL src_url(src_path);
- FileSystemURL dest_url(dest_path);
+ FileSystemURL src_url(file_system_context()->CrackURL(src_path));
+ FileSystemURL dest_url(file_system_context()->CrackURL(dest_path));
if (!HasFilePermission(src_url, FILE_PERMISSION_READ) ||
!HasFilePermission(dest_url, FILE_PERMISSION_CREATE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
@@ -150,7 +150,7 @@ void SimpleFileSystem::copy(
void SimpleFileSystem::remove(
const WebURL& path, WebFileSystemCallbacks* callbacks) {
- FileSystemURL url(path);
+ FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_WRITE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
@@ -161,7 +161,7 @@ void SimpleFileSystem::remove(
void SimpleFileSystem::removeRecursively(
const WebURL& path, WebFileSystemCallbacks* callbacks) {
- FileSystemURL url(path);
+ FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_WRITE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
@@ -172,7 +172,7 @@ void SimpleFileSystem::removeRecursively(
void SimpleFileSystem::readMetadata(
const WebURL& path, WebFileSystemCallbacks* callbacks) {
- FileSystemURL url(path);
+ FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
@@ -182,7 +182,7 @@ void SimpleFileSystem::readMetadata(
void SimpleFileSystem::createFile(
const WebURL& path, bool exclusive, WebFileSystemCallbacks* callbacks) {
- FileSystemURL url(path);
+ FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_CREATE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
@@ -192,7 +192,7 @@ void SimpleFileSystem::createFile(
void SimpleFileSystem::createDirectory(
const WebURL& path, bool exclusive, WebFileSystemCallbacks* callbacks) {
- FileSystemURL url(path);
+ FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_CREATE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
@@ -203,7 +203,7 @@ void SimpleFileSystem::createDirectory(
void SimpleFileSystem::fileExists(
const WebURL& path, WebFileSystemCallbacks* callbacks) {
- FileSystemURL url(path);
+ FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
@@ -213,7 +213,7 @@ void SimpleFileSystem::fileExists(
void SimpleFileSystem::directoryExists(
const WebURL& path, WebFileSystemCallbacks* callbacks) {
- FileSystemURL url(path);
+ FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
@@ -223,7 +223,7 @@ void SimpleFileSystem::directoryExists(
void SimpleFileSystem::readDirectory(
const WebURL& path, WebFileSystemCallbacks* callbacks) {
- FileSystemURL url(path);
+ FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
@@ -240,7 +240,7 @@ void SimpleFileSystem::createSnapshotFileAndReadMetadata(
const WebURL& blobURL,
const WebURL& path,
WebFileSystemCallbacks* callbacks) {
- FileSystemURL url(path);
+ FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;

Powered by Google App Engine
This is Rietveld 408576698