From 60f60f854736bd82e9e8d5967ec160df38fcd660 Mon Sep 17 00:00:00 2001 From: "kinuko@chromium.org" Date: Wed, 11 Jan 2012 10:26:10 +0000 Subject: Cleanup FileSystemOperation for preparing for adding FSO-factory method 1. Move OpenFileSystem() to FileSystemContext 2. Change Cancel() not to take another FileSystemOperation These two changes are made so that all the operations that require FileSystemOperation take target path URL. 3. Did some related code cleanups in FileSystemMountPointProvider: - Renamed ValidateFileSystemRootAndGetURL() to ValidateFileSystemRoot() as we no longer need to return RootURL - Renamed ValidateFileSystemRootAndGetPathOnFileThread() to GetFileSystemRootPathOnFileThread() for the sake of simplicity - Reimplemented SandboxMPP::GetRootPathTask using PostTaskAndReply Patch from http://codereview.chromium.org/9004019/ BUG=none TEST=existing tests should pass Review URL: http://codereview.chromium.org/9016020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117197 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/fileapi/file_system_test_helper.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'webkit/fileapi/file_system_test_helper.cc') diff --git a/webkit/fileapi/file_system_test_helper.cc b/webkit/fileapi/file_system_test_helper.cc index d542d10..4bb4011 100644 --- a/webkit/fileapi/file_system_test_helper.cc +++ b/webkit/fileapi/file_system_test_helper.cc @@ -8,6 +8,7 @@ #include "base/message_loop.h" #include "base/message_loop_proxy.h" #include "googleurl/src/gurl.h" +#include "webkit/fileapi/file_system_callback_dispatcher.h" #include "webkit/fileapi/file_system_context.h" #include "webkit/fileapi/file_system_operation.h" #include "webkit/fileapi/file_system_operation_context.h" @@ -50,7 +51,7 @@ void FileSystemTestOriginHelper::SetUp( // Prepare the origin's root directory. file_system_context_->GetMountPointProvider(type_)-> - ValidateFileSystemRootAndGetPathOnFileThread( + GetFileSystemRootPathOnFileThread( origin_, type_, FilePath(), true /* create */); // Initialize the usage cache file. @@ -81,7 +82,7 @@ void FileSystemTestOriginHelper::SetUp( // Prepare the origin's root directory. file_system_context_->GetMountPointProvider(type_)-> - ValidateFileSystemRootAndGetPathOnFileThread( + GetFileSystemRootPathOnFileThread( origin_, type_, FilePath(), true /* create */); // Initialize the usage cache file. This code assumes that we're either using @@ -98,7 +99,7 @@ void FileSystemTestOriginHelper::TearDown() { FilePath FileSystemTestOriginHelper::GetOriginRootPath() const { return file_system_context_->GetMountPointProvider(type_)-> - ValidateFileSystemRootAndGetPathOnFileThread( + GetFileSystemRootPathOnFileThread( origin_, type_, FilePath(), false); } @@ -145,7 +146,8 @@ FileSystemOperation* FileSystemTestOriginHelper::NewOperation( DCHECK(file_system_context_.get()); DCHECK(file_util_); FileSystemOperation* operation = - new FileSystemOperation(callback_dispatcher, + new FileSystemOperation(scoped_ptr( + callback_dispatcher), base::MessageLoopProxy::current(), file_system_context_.get()); operation->set_override_file_util(file_util_); -- cgit v1.1