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

Unified Diff: webkit/fileapi/file_system_mount_point_provider_unittest.cc

Issue 9016020: Cleanup FileSystemOperation for preparing for adding FSO-factory method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more cleanup around ValidateFileSystemRoot Created 9 years 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/fileapi/file_system_mount_point_provider_unittest.cc
diff --git a/webkit/fileapi/file_system_mount_point_provider_unittest.cc b/webkit/fileapi/file_system_mount_point_provider_unittest.cc
index e225d3d8777f50713473bfe944b5c3c1867a053d..0ba8433a489746c345321abe3a0de342e4b727c7 100644
--- a/webkit/fileapi/file_system_mount_point_provider_unittest.cc
+++ b/webkit/fileapi/file_system_mount_point_provider_unittest.cc
@@ -223,7 +223,6 @@ class FileSystemMountPointProviderTest : public testing::Test {
ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
root_path_callback_status_ = false;
root_path_.clear();
- file_system_name_.clear();
special_storage_policy_ = new quota::MockSpecialStoragePolicy;
}
@@ -249,26 +248,15 @@ class FileSystemMountPointProviderTest : public testing::Test {
return file_system_context_->GetMountPointProvider(type);
}
- void OnGetRootPath(bool success,
- const FilePath& root_path,
- const std::string& name) {
- root_path_callback_status_ = success;
- root_path_ = root_path;
- file_system_name_ = name;
- }
-
bool GetRootPath(const GURL& origin_url,
fileapi::FileSystemType type,
bool create,
FilePath* root_path) {
- provider(type)->ValidateFileSystemRootAndGetURL(
- origin_url, type, create,
- base::Bind(&FileSystemMountPointProviderTest::OnGetRootPath,
- weak_factory_.GetWeakPtr()));
- MessageLoop::current()->RunAllPending();
+ root_path_ = provider(type)->GetFileSystemRootPathOnFileThread(
+ origin_url, type, FilePath(), create);
if (root_path)
*root_path = root_path_;
- return root_path_callback_status_;
+ return !root_path_.empty();
}
FilePath data_path() { return data_dir_.path(); }
@@ -289,7 +277,6 @@ class FileSystemMountPointProviderTest : public testing::Test {
bool root_path_callback_status_;
FilePath root_path_;
- std::string file_system_name_;
scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
scoped_refptr<FileSystemContext> file_system_context_;

Powered by Google App Engine
This is Rietveld 408576698