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

Unified Diff: webkit/browser/fileapi/sandbox_file_system_backend_unittest.cc

Issue 23167002: FileAPI: Rename SandboxContext to SandboxFileSystemBackendDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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/browser/fileapi/sandbox_file_system_backend_unittest.cc
diff --git a/webkit/browser/fileapi/sandbox_file_system_backend_unittest.cc b/webkit/browser/fileapi/sandbox_file_system_backend_unittest.cc
index ec213a36386879905f62f9ebc492388e11c57e17..c7f03170e4275e4902e5df0caa1501f50f356d16 100644
--- a/webkit/browser/fileapi/sandbox_file_system_backend_unittest.cc
+++ b/webkit/browser/fileapi/sandbox_file_system_backend_unittest.cc
@@ -17,7 +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/browser/fileapi/sandbox_file_system_backend_delegate.h"
#include "webkit/common/fileapi/file_system_util.h"
// PS stands for path separator.
@@ -85,11 +85,11 @@ class SandboxFileSystemBackendTest : public testing::Test {
protected:
virtual void SetUp() {
ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
- SetUpNewSandboxContext(CreateAllowFileAccessOptions());
+ SetUpNewDelegate(CreateAllowFileAccessOptions());
}
- void SetUpNewSandboxContext(const FileSystemOptions& options) {
- context_.reset(new SandboxContext(
+ void SetUpNewDelegate(const FileSystemOptions& options) {
+ delegate_.reset(new SandboxFileSystemBackendDelegate(
NULL /* quota_manager_proxy */,
base::MessageLoopProxy::current().get(),
data_dir_.path(),
@@ -98,17 +98,18 @@ class SandboxFileSystemBackendTest : public testing::Test {
}
void SetUpNewBackend(const FileSystemOptions& options) {
- SetUpNewSandboxContext(options);
- backend_.reset(new SandboxFileSystemBackend(context_.get()));
+ SetUpNewDelegate(options);
+ backend_.reset(new SandboxFileSystemBackend(delegate_.get()));
}
- SandboxContext::OriginEnumerator* CreateOriginEnumerator() const {
+ SandboxFileSystemBackendDelegate::OriginEnumerator*
+ CreateOriginEnumerator() const {
return backend_->CreateOriginEnumerator();
}
void CreateOriginTypeDirectory(const GURL& origin,
fileapi::FileSystemType type) {
- base::FilePath target = context_->
+ base::FilePath target = delegate_->
GetBaseDirectoryForOriginAndType(origin, type, true);
ASSERT_TRUE(!target.empty());
ASSERT_TRUE(base::DirectoryExists(target));
@@ -126,7 +127,7 @@ class SandboxFileSystemBackendTest : public testing::Test {
if (error != base::PLATFORM_FILE_OK)
return false;
base::FilePath returned_root_path =
- context_->GetBaseDirectoryForOriginAndType(
+ delegate_->GetBaseDirectoryForOriginAndType(
origin_url, type, false /* create */);
if (root_path)
*root_path = returned_root_path;
@@ -134,18 +135,19 @@ class SandboxFileSystemBackendTest : public testing::Test {
}
base::FilePath file_system_path() const {
- return data_dir_.path().Append(SandboxContext::kFileSystemDirectory);
+ return data_dir_.path().Append(
+ SandboxFileSystemBackendDelegate::kFileSystemDirectory);
}
base::ScopedTempDir data_dir_;
base::MessageLoop message_loop_;
- scoped_ptr<SandboxContext> context_;
+ scoped_ptr<SandboxFileSystemBackendDelegate> delegate_;
scoped_ptr<SandboxFileSystemBackend> backend_;
};
TEST_F(SandboxFileSystemBackendTest, Empty) {
SetUpNewBackend(CreateAllowFileAccessOptions());
- scoped_ptr<SandboxContext::OriginEnumerator> enumerator(
+ scoped_ptr<SandboxFileSystemBackendDelegate::OriginEnumerator> enumerator(
CreateOriginEnumerator());
ASSERT_TRUE(enumerator->Next().is_empty());
}
@@ -178,7 +180,7 @@ TEST_F(SandboxFileSystemBackendTest, EnumerateOrigins) {
persistent_set.insert(GURL(persistent_origins[i]));
}
- scoped_ptr<SandboxContext::OriginEnumerator> enumerator(
+ scoped_ptr<SandboxFileSystemBackendDelegate::OriginEnumerator> enumerator(
CreateOriginEnumerator());
size_t temporary_actual_size = 0;
size_t persistent_actual_size = 0;

Powered by Google App Engine
This is Rietveld 408576698