diff options
author | nhiroki@chromium.org <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-10 09:25:47 +0000 |
---|---|---|
committer | nhiroki@chromium.org <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-10 09:25:47 +0000 |
commit | cacf4e2d364d72ac9b58279c22a8fa9f279e35ba (patch) | |
tree | 287434ca1da5d8e8dd9bfe66efca0128f465f8d0 /webkit/browser/fileapi/sandbox_file_system_backend_unittest.cc | |
parent | 085934ac4351ce89279bf313e74e57461a6f2835 (diff) | |
download | chromium_src-cacf4e2d364d72ac9b58279c22a8fa9f279e35ba.zip chromium_src-cacf4e2d364d72ac9b58279c22a8fa9f279e35ba.tar.gz chromium_src-cacf4e2d364d72ac9b58279c22a8fa9f279e35ba.tar.bz2 |
FileAPI: Add SandboxContext
This change introduces SandboxContext class which keeps and provides a sandbox
filesystem context so that we can share the context among multiple FS backends.
BUG=242422
TEST=content_unittests
Review URL: https://chromiumcodereview.appspot.com/18378005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/browser/fileapi/sandbox_file_system_backend_unittest.cc')
-rw-r--r-- | webkit/browser/fileapi/sandbox_file_system_backend_unittest.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/webkit/browser/fileapi/sandbox_file_system_backend_unittest.cc b/webkit/browser/fileapi/sandbox_file_system_backend_unittest.cc index 386586b..237a583 100644 --- a/webkit/browser/fileapi/sandbox_file_system_backend_unittest.cc +++ b/webkit/browser/fileapi/sandbox_file_system_backend_unittest.cc @@ -17,6 +17,7 @@ #include "webkit/browser/fileapi/file_system_backend.h" #include "webkit/browser/fileapi/file_system_url.h" #include "webkit/browser/fileapi/mock_file_system_options.h" +#include "webkit/browser/fileapi/sandbox_context.h" #include "webkit/common/fileapi/file_system_util.h" // PS stands for path separator. @@ -82,15 +83,15 @@ class SandboxFileSystemBackendTest : public testing::Test { protected: virtual void SetUp() { ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); + context_.reset(new SandboxContext( + NULL /* quota_manager_proxy */, + base::MessageLoopProxy::current().get(), + data_dir_.path(), + NULL /* special_storage_policy */)); } void SetUpNewBackend(const FileSystemOptions& options) { - backend_.reset( - new SandboxFileSystemBackend(NULL, - base::MessageLoopProxy::current().get(), - data_dir_.path(), - options, - NULL)); + backend_.reset(new SandboxFileSystemBackend(context_.get(), options)); } SandboxFileSystemBackend::OriginEnumerator* CreateOriginEnumerator() const { @@ -125,12 +126,12 @@ class SandboxFileSystemBackendTest : public testing::Test { } base::FilePath file_system_path() const { - return data_dir_.path().Append( - SandboxFileSystemBackend::kFileSystemDirectory); + return data_dir_.path().Append(SandboxContext::kFileSystemDirectory); } base::ScopedTempDir data_dir_; base::MessageLoop message_loop_; + scoped_ptr<SandboxContext> context_; scoped_ptr<SandboxFileSystemBackend> backend_; }; |