diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-11 10:26:10 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-11 10:26:10 +0000 |
commit | 60f60f854736bd82e9e8d5967ec160df38fcd660 (patch) | |
tree | 41fdbe702084398954904afe6993be40c8c4e909 /webkit/fileapi/file_system_test_helper.cc | |
parent | 9569b218572ab58deb22546cde49d2bd8ea20c48 (diff) | |
download | chromium_src-60f60f854736bd82e9e8d5967ec160df38fcd660.zip chromium_src-60f60f854736bd82e9e8d5967ec160df38fcd660.tar.gz chromium_src-60f60f854736bd82e9e8d5967ec160df38fcd660.tar.bz2 |
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
Diffstat (limited to 'webkit/fileapi/file_system_test_helper.cc')
-rw-r--r-- | webkit/fileapi/file_system_test_helper.cc | 10 |
1 files changed, 6 insertions, 4 deletions
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<FileSystemCallbackDispatcher>( + callback_dispatcher), base::MessageLoopProxy::current(), file_system_context_.get()); operation->set_override_file_util(file_util_); |