#include <vector>
#include "base/bind_helpers.h"
-#include "base/file_util.h"
+#include "base/files/file_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/media_galleries/fileapi/iphoto_data_provider.h"
#include "chrome/browser/media_galleries/fileapi/media_path_filter.h"
#include "chrome/browser/media_galleries/imported_media_gallery_registry.h"
#include "content/public/browser/browser_thread.h"
-#include "webkit/browser/fileapi/file_system_operation_context.h"
-#include "webkit/browser/fileapi/file_system_url.h"
-#include "webkit/browser/fileapi/native_file_util.h"
-#include "webkit/common/blob/shareable_file_reference.h"
-#include "webkit/common/fileapi/directory_entry.h"
-#include "webkit/common/fileapi/file_system_util.h"
+#include "storage/browser/fileapi/file_system_operation_context.h"
+#include "storage/browser/fileapi/file_system_url.h"
+#include "storage/browser/fileapi/native_file_util.h"
+#include "storage/common/blob/shareable_file_reference.h"
+#include "storage/common/fileapi/directory_entry.h"
+#include "storage/common/fileapi/file_system_util.h"
-using fileapi::DirectoryEntry;
+using storage::DirectoryEntry;
namespace iphoto {
}
std::vector<std::string> GetVirtualPathComponents(
- const fileapi::FileSystemURL& url) {
+ const storage::FileSystemURL& url) {
ImportedMediaGalleryRegistry* imported_registry =
ImportedMediaGalleryRegistry::GetInstance();
base::FilePath root = imported_registry->ImportedRoot().AppendASCII("iphoto");
root.AppendRelativePath(url.path(), &virtual_path);
std::vector<std::string> result;
- fileapi::VirtualPath::GetComponentsUTF8Unsafe(virtual_path, &result);
+ storage::VirtualPath::GetComponentsUTF8Unsafe(virtual_path, &result);
return result;
}
}
void IPhotoFileUtil::GetFileInfoOnTaskRunnerThread(
- scoped_ptr<fileapi::FileSystemOperationContext> context,
- const fileapi::FileSystemURL& url,
+ scoped_ptr<storage::FileSystemOperationContext> context,
+ const storage::FileSystemURL& url,
const GetFileInfoCallback& callback) {
IPhotoDataProvider* data_provider = GetDataProvider();
// |data_provider| may be NULL if the file system was revoked before this
}
void IPhotoFileUtil::ReadDirectoryOnTaskRunnerThread(
- scoped_ptr<fileapi::FileSystemOperationContext> context,
- const fileapi::FileSystemURL& url,
+ scoped_ptr<storage::FileSystemOperationContext> context,
+ const storage::FileSystemURL& url,
const ReadDirectoryCallback& callback) {
IPhotoDataProvider* data_provider = GetDataProvider();
// |data_provider| may be NULL if the file system was revoked before this
}
void IPhotoFileUtil::CreateSnapshotFileOnTaskRunnerThread(
- scoped_ptr<fileapi::FileSystemOperationContext> context,
- const fileapi::FileSystemURL& url,
+ scoped_ptr<storage::FileSystemOperationContext> context,
+ const storage::FileSystemURL& url,
const CreateSnapshotFileCallback& callback) {
IPhotoDataProvider* data_provider = GetDataProvider();
// |data_provider| may be NULL if the file system was revoked before this
}
void IPhotoFileUtil::GetFileInfoWithFreshDataProvider(
- scoped_ptr<fileapi::FileSystemOperationContext> context,
- const fileapi::FileSystemURL& url,
+ scoped_ptr<storage::FileSystemOperationContext> context,
+ const storage::FileSystemURL& url,
const GetFileInfoCallback& callback,
bool valid_parse) {
if (!valid_parse) {
}
void IPhotoFileUtil::ReadDirectoryWithFreshDataProvider(
- scoped_ptr<fileapi::FileSystemOperationContext> context,
- const fileapi::FileSystemURL& url,
+ scoped_ptr<storage::FileSystemOperationContext> context,
+ const storage::FileSystemURL& url,
const ReadDirectoryCallback& callback,
bool valid_parse) {
if (!valid_parse) {
}
void IPhotoFileUtil::CreateSnapshotFileWithFreshDataProvider(
- scoped_ptr<fileapi::FileSystemOperationContext> context,
- const fileapi::FileSystemURL& url,
+ scoped_ptr<storage::FileSystemOperationContext> context,
+ const storage::FileSystemURL& url,
const CreateSnapshotFileCallback& callback,
bool valid_parse) {
if (!valid_parse) {
if (!callback.is_null()) {
base::File::Info file_info;
base::FilePath platform_path;
- scoped_refptr<webkit_blob::ShareableFileReference> file_ref;
+ scoped_refptr<storage::ShareableFileReference> file_ref;
content::BrowserThread::PostTask(
content::BrowserThread::IO,
FROM_HERE,
// Begin actual implementation.
base::File::Error IPhotoFileUtil::GetFileInfoSync(
- fileapi::FileSystemOperationContext* context,
- const fileapi::FileSystemURL& url,
+ storage::FileSystemOperationContext* context,
+ const storage::FileSystemURL& url,
base::File::Info* file_info,
base::FilePath* platform_path) {
std::vector<std::string> components = GetVirtualPathComponents(url);
}
base::File::Error IPhotoFileUtil::ReadDirectorySync(
- fileapi::FileSystemOperationContext* context,
- const fileapi::FileSystemURL& url,
+ storage::FileSystemOperationContext* context,
+ const storage::FileSystemURL& url,
EntryList* file_list) {
DCHECK(file_list->empty());
std::vector<std::string> components = GetVirtualPathComponents(url);
}
base::File::Error IPhotoFileUtil::DeleteDirectorySync(
- fileapi::FileSystemOperationContext* context,
- const fileapi::FileSystemURL& url) {
+ storage::FileSystemOperationContext* context,
+ const storage::FileSystemURL& url) {
return base::File::FILE_ERROR_SECURITY;
}
base::File::Error IPhotoFileUtil::DeleteFileSync(
- fileapi::FileSystemOperationContext* context,
- const fileapi::FileSystemURL& url) {
+ storage::FileSystemOperationContext* context,
+ const storage::FileSystemURL& url) {
return base::File::FILE_ERROR_SECURITY;
}
-
base::File::Error IPhotoFileUtil::GetLocalFilePath(
- fileapi::FileSystemOperationContext* context,
- const fileapi::FileSystemURL& url,
+ storage::FileSystemOperationContext* context,
+ const storage::FileSystemURL& url,
base::FilePath* local_file_path) {
std::vector<std::string> components = GetVirtualPathComponents(url);