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

Unified Diff: chrome/browser/browsing_data_file_system_helper_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: build fix 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
Index: chrome/browser/browsing_data_file_system_helper_unittest.cc
diff --git a/chrome/browser/browsing_data_file_system_helper_unittest.cc b/chrome/browser/browsing_data_file_system_helper_unittest.cc
index 55ac7eddbb1e274a09676bdb04221c6e581dcd65..5e05dfc247efa512a9b899fc38b68eba2ac7cd06 100644
--- a/chrome/browser/browsing_data_file_system_helper_unittest.cc
+++ b/chrome/browser/browsing_data_file_system_helper_unittest.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/file_util.h"
+#include "base/platform_file.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browsing_data_file_system_helper.h"
@@ -77,11 +78,9 @@ class BrowsingDataFileSystemHelperTest : public testing::Test {
}
// Callback that should be executed in response to
- // fileapi::SandboxMountPointProvider::ValidateFileSystemRootAndGetURL
- void CallbackFindFileSystemPath(bool success,
- const FilePath& path,
- const std::string& name) {
- found_file_system_ = success;
+ // fileapi::SandboxMountPointProvider::ValidateFileSystemRoot
+ void ValidateFileSystemCallback(base::PlatformFileError error) {
+ validate_file_system_result_ = error;
Notify();
}
@@ -91,13 +90,13 @@ class BrowsingDataFileSystemHelperTest : public testing::Test {
// synchronously to it's caller.
bool FileSystemContainsOriginAndType(const GURL& origin,
fileapi::FileSystemType type) {
- sandbox_->ValidateFileSystemRootAndGetURL(
+ sandbox_->ValidateFileSystemRoot(
origin, type, false,
base::Bind(
- &BrowsingDataFileSystemHelperTest::CallbackFindFileSystemPath,
+ &BrowsingDataFileSystemHelperTest::ValidateFileSystemCallback,
base::Unretained(this)));
BlockUntilNotified();
- return found_file_system_;
+ return validate_file_system_result_ == base::PLATFORM_FILE_OK;
}
// Callback that should be executed in response to StartFetching(), and stores
@@ -151,7 +150,7 @@ class BrowsingDataFileSystemHelperTest : public testing::Test {
// specified origin.
void CreateDirectoryForOriginAndType(const GURL& origin,
fileapi::FileSystemType type) {
- FilePath target = sandbox_->ValidateFileSystemRootAndGetPathOnFileThread(
+ FilePath target = sandbox_->GetFileSystemRootPathOnFileThread(
origin, type, FilePath(), true);
EXPECT_TRUE(file_util::DirectoryExists(target));
}
@@ -164,7 +163,7 @@ class BrowsingDataFileSystemHelperTest : public testing::Test {
// Temporary storage to pass information back from callbacks.
- bool found_file_system_;
+ base::PlatformFileError validate_file_system_result_;
ScopedFileSystemInfoList file_system_info_list_;
scoped_refptr<BrowsingDataFileSystemHelper> helper_;

Powered by Google App Engine
This is Rietveld 408576698