#include "base/bind.h"
#include "base/bind_helpers.h"
-#include "base/file_util.h"
+#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "content/public/test/mock_special_storage_policy.h"
#include "content/public/test/test_browser_thread.h"
#include "content/public/test/test_file_system_options.h"
+#include "storage/browser/fileapi/async_file_util.h"
+#include "storage/browser/fileapi/external_mount_points.h"
+#include "storage/browser/fileapi/file_system_context.h"
+#include "storage/browser/fileapi/file_system_operation_context.h"
+#include "storage/browser/fileapi/file_system_operation_runner.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/browser/fileapi/async_file_util.h"
-#include "webkit/browser/fileapi/external_mount_points.h"
-#include "webkit/browser/fileapi/file_system_context.h"
-#include "webkit/browser/fileapi/file_system_operation_context.h"
-#include "webkit/browser/fileapi/file_system_operation_runner.h"
-using fileapi::FileSystemOperationContext;
-using fileapi::FileSystemOperation;
-using fileapi::FileSystemURL;
+using storage::FileSystemOperationContext;
+using storage::FileSystemOperation;
+using storage::FileSystemURL;
namespace iphoto {
run_loop->Quit();
}
-void ReadDirectoryTestHelper(fileapi::FileSystemOperationRunner* runner,
+void ReadDirectoryTestHelper(storage::FileSystemOperationRunner* runner,
const FileSystemURL& url,
FileSystemOperation::FileEntryList* contents,
bool* completed) {
MediaFileSystemBackend::MediaTaskRunner().get()),
test_file_util_(iphoto_file_util) {}
- virtual fileapi::AsyncFileUtil*
- GetAsyncFileUtil(fileapi::FileSystemType type) OVERRIDE {
- if (type != fileapi::kFileSystemTypeIphoto)
+ virtual storage::AsyncFileUtil* GetAsyncFileUtil(
+ storage::FileSystemType type) OVERRIDE {
+ if (type != storage::kFileSystemTypeIphoto)
return NULL;
return test_file_util_.get();
}
private:
- scoped_ptr<fileapi::AsyncFileUtil> test_file_util_;
+ scoped_ptr<storage::AsyncFileUtil> test_file_util_;
};
class IPhotoFileUtilTest : public testing::Test {
ASSERT_TRUE(profile_dir_.CreateUniqueTempDir());
ImportedMediaGalleryRegistry::GetInstance()->Initialize();
- scoped_refptr<quota::SpecialStoragePolicy> storage_policy =
+ scoped_refptr<storage::SpecialStoragePolicy> storage_policy =
new content::MockSpecialStoragePolicy();
// Initialize fake IPhotoDataProvider on media task runner thread.
event.Wait();
media_path_filter_.reset(new MediaPathFilter());
- ScopedVector<fileapi::FileSystemBackend> additional_providers;
+ ScopedVector<storage::FileSystemBackend> additional_providers;
additional_providers.push_back(new TestMediaFileSystemBackend(
profile_dir_.path(),
new TestIPhotoFileUtil(media_path_filter_.get(),
iphoto_data_provider_.get())));
- file_system_context_ = new fileapi::FileSystemContext(
+ file_system_context_ = new storage::FileSystemContext(
base::MessageLoopProxy::current().get(),
base::MessageLoopProxy::current().get(),
- fileapi::ExternalMountPoints::CreateRefCounted().get(),
+ storage::ExternalMountPoints::CreateRefCounted().get(),
storage_policy.get(),
NULL,
additional_providers.Pass(),
- std::vector<fileapi::URLRequestAutoMountHandler>(),
+ std::vector<storage::URLRequestAutoMountHandler>(),
profile_dir_.path(),
content::CreateAllowFileAccessOptions());
}
virtual_path = virtual_path.AppendASCII("iphoto");
virtual_path = virtual_path.AppendASCII(path);
return file_system_context_->CreateCrackedFileSystemURL(
- GURL("http://www.example.com"), fileapi::kFileSystemTypeIphoto,
+ GURL("http://www.example.com"),
+ storage::kFileSystemTypeIphoto,
virtual_path);
}
- fileapi::FileSystemOperationRunner* operation_runner() const {
+ storage::FileSystemOperationRunner* operation_runner() const {
return file_system_context_->operation_runner();
}
- scoped_refptr<fileapi::FileSystemContext> file_system_context() const {
+ scoped_refptr<storage::FileSystemContext> file_system_context() const {
return file_system_context_;
}
base::ScopedTempDir profile_dir_;
base::ScopedTempDir fake_library_dir_;
- scoped_refptr<fileapi::FileSystemContext> file_system_context_;
+ scoped_refptr<storage::FileSystemContext> file_system_context_;
scoped_ptr<MediaPathFilter> media_path_filter_;
scoped_ptr<TestIPhotoDataProvider> iphoto_data_provider_;