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

Unified Diff: webkit/fileapi/sandbox_mount_point_provider_unittest.cc

Issue 9004019: Cleanup: Removing FileSystemPathManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 12 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
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider.cc ('k') | webkit/fileapi/webkit_fileapi.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/sandbox_mount_point_provider_unittest.cc
diff --git a/webkit/fileapi/sandbox_mount_point_provider_unittest.cc b/webkit/fileapi/sandbox_mount_point_provider_unittest.cc
index 60ad07eb9cd28570dfa90e2cd8f4bb3a40138d0d..5563e4136b97b06a2c46c54e0b6a4a5ea90733d7 100644
--- a/webkit/fileapi/sandbox_mount_point_provider_unittest.cc
+++ b/webkit/fileapi/sandbox_mount_point_provider_unittest.cc
@@ -20,42 +20,40 @@
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/fileapi/file_system_context.h"
+#include "webkit/fileapi/file_system_mount_point_provider.h"
#include "webkit/fileapi/file_system_operation_context.h"
-#include "webkit/fileapi/file_system_path_manager.h"
#include "webkit/fileapi/file_system_util.h"
+#include "webkit/fileapi/mock_file_system_options.h"
#include "webkit/quota/mock_special_storage_policy.h"
namespace fileapi {
-class MockFileSystemPathManager : public FileSystemPathManager {
- public:
- explicit MockFileSystemPathManager(const FilePath& profile_path)
- : FileSystemPathManager(base::MessageLoopProxy::current(),
- profile_path, NULL, false, true) {}
-};
-
class SandboxMountPointProviderOriginEnumeratorTest : public testing::Test {
public:
void SetUp() {
ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
- path_manager_.reset(new MockFileSystemPathManager(data_dir_.path()));
+ sandbox_provider_.reset(
+ new SandboxMountPointProvider(
+ base::MessageLoopProxy::current(),
+ data_dir_.path(),
+ CreateAllowFileAccessOptions()));
}
SandboxMountPointProvider::OriginEnumerator* CreateEnumerator() const {
- return path_manager_->sandbox_provider()->CreateOriginEnumerator();
+ return sandbox_provider_->CreateOriginEnumerator();
}
protected:
void CreateOriginTypeDirectory(const GURL& origin,
fileapi::FileSystemType type) {
- FilePath target = path_manager_->sandbox_provider()->
+ FilePath target = sandbox_provider_->
GetBaseDirectoryForOriginAndType(origin, type, true);
ASSERT_TRUE(!target.empty());
ASSERT_TRUE(file_util::DirectoryExists(target));
}
ScopedTempDir data_dir_;
- scoped_ptr<FileSystemPathManager> path_manager_;
+ scoped_ptr<SandboxMountPointProvider> sandbox_provider_;
};
TEST_F(SandboxMountPointProviderOriginEnumeratorTest, Empty) {
@@ -139,8 +137,6 @@ class SandboxMountPointProviderMigrationTest : public testing::Test {
void SetUp() {
ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
- path_manager_ = new MockFileSystemPathManager(data_dir_.path());
-
scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy =
new quota::MockSpecialStoragePolicy;
special_storage_policy->SetAllUnlimited(true);
@@ -150,17 +146,11 @@ class SandboxMountPointProviderMigrationTest : public testing::Test {
special_storage_policy,
NULL,
data_dir_.path(),
- false, // incognito
- true, // allow_file_access_from_files
- path_manager_);
- }
-
- FileSystemPathManager* path_manager() {
- return path_manager_;
+ CreateAllowFileAccessOptions());
}
SandboxMountPointProvider* sandbox_provider() {
- return path_manager()->sandbox_provider();
+ return file_system_context_->sandbox_provider();
}
FileSystemFileUtil* file_util() {
@@ -172,7 +162,7 @@ class SandboxMountPointProviderMigrationTest : public testing::Test {
EXPECT_FALSE(success); // We told it not to create.
}
- FileSystemPathManager::GetRootPathCallback GetRootPathCallback() {
+ FileSystemMountPointProvider::GetRootPathCallback GetRootPathCallback() {
return base::Bind(&SandboxMountPointProviderMigrationTest::OnGetRootPath,
weak_factory_.GetWeakPtr());
}
@@ -218,7 +208,7 @@ class SandboxMountPointProviderMigrationTest : public testing::Test {
std::string URLAndTypeToSeedString(const GURL& origin_url,
fileapi::FileSystemType type) {
return GetOriginIdentifierFromURL(origin_url) +
- FileSystemPathManager::GetFileSystemTypeString(type);
+ GetFileSystemTypeString(type);
}
void ValidateDataInNewFileSystem(
@@ -357,7 +347,6 @@ class SandboxMountPointProviderMigrationTest : public testing::Test {
protected:
ScopedTempDir data_dir_;
- FileSystemPathManager* path_manager_;
scoped_refptr<FileSystemContext> file_system_context_;
base::WeakPtrFactory<SandboxMountPointProviderMigrationTest> weak_factory_;
};
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider.cc ('k') | webkit/fileapi/webkit_fileapi.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698