#include "content/child/fileapi/webfilewriter_impl.h"
#include "content/child/worker_task_runner.h"
#include "content/common/fileapi/file_system_messages.h"
+#include "storage/common/fileapi/directory_entry.h"
+#include "storage/common/fileapi/file_system_util.h"
#include "third_party/WebKit/public/platform/WebFileInfo.h"
#include "third_party/WebKit/public/platform/WebFileSystemCallbacks.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/web/WebHeap.h"
#include "url/gurl.h"
-#include "webkit/common/fileapi/directory_entry.h"
-#include "webkit/common/fileapi/file_system_util.h"
using blink::WebFileInfo;
using blink::WebFileSystemCallbacks;
callbacks->didReadMetadata(web_file_info);
}
-void DidReadDirectory(const std::vector<fileapi::DirectoryEntry>& entries,
- bool has_more, WebFileSystemCallbacks* callbacks) {
+void DidReadDirectory(const std::vector<storage::DirectoryEntry>& entries,
+ bool has_more,
+ WebFileSystemCallbacks* callbacks) {
WebVector<WebFileSystemEntry> file_system_entries(entries.size());
for (size_t i = 0; i < entries.size(); ++i) {
file_system_entries[i].name =
callbacks->didOpenFileSystem(name, root);
}
-void DidResolveURL(
- const base::string16& name,
- const GURL& root_url,
- fileapi::FileSystemType mount_type,
- const base::string16& file_path,
- bool is_directory,
- WebFileSystemCallbacks* callbacks) {
+void DidResolveURL(const base::string16& name,
+ const GURL& root_url,
+ storage::FileSystemType mount_type,
+ const base::string16& file_path,
+ bool is_directory,
+ WebFileSystemCallbacks* callbacks) {
callbacks->didResolveURL(
name,
root_url,
}
void DidFail(base::File::Error error, WebFileSystemCallbacks* callbacks) {
- callbacks->didFail(fileapi::FileErrorToWebFileError(error));
+ callbacks->didFail(storage::FileErrorToWebFileError(error));
}
// Run WebFileSystemCallbacks's |method| with |params|.
UNREGISTER_CALLBACKS);
}
-void ResolveURLCallbackAdapter(
- int thread_id, int callbacks_id,
- WaitableCallbackResults* waitable_results,
- const fileapi::FileSystemInfo& info,
- const base::FilePath& file_path, bool is_directory) {
+void ResolveURLCallbackAdapter(int thread_id,
+ int callbacks_id,
+ WaitableCallbackResults* waitable_results,
+ const storage::FileSystemInfo& info,
+ const base::FilePath& file_path,
+ bool is_directory) {
base::FilePath normalized_path(
- fileapi::VirtualPath::GetNormalizedFilePath(file_path));
+ storage::VirtualPath::GetNormalizedFilePath(file_path));
CallbackFileSystemCallbacks(
thread_id, callbacks_id, waitable_results,
base::Bind(&DidResolveURL, base::UTF8ToUTF16(info.name), info.root_url,
}
void ReadDirectoryCallbackAdapter(
- int thread_id, int callbacks_id, WaitableCallbackResults* waitable_results,
- const std::vector<fileapi::DirectoryEntry>& entries,
+ int thread_id,
+ int callbacks_id,
+ WaitableCallbackResults* waitable_results,
+ const std::vector<storage::DirectoryEntry>& entries,
bool has_more) {
CallbackFileSystemCallbacks(
thread_id, callbacks_id, waitable_results,
main_thread_loop_.get(),
&FileSystemDispatcher::OpenFileSystem,
MakeTuple(GURL(storage_partition),
- static_cast<fileapi::FileSystemType>(type),
+ static_cast<storage::FileSystemType>(type),
base::Bind(&OpenFileSystemCallbackAdapter,
- CurrentWorkerId(), callbacks_id, waitable_results),
+ CurrentWorkerId(),
+ callbacks_id,
+ waitable_results),
base::Bind(&StatusCallbackAdapter,
- CurrentWorkerId(), callbacks_id, waitable_results)),
+ CurrentWorkerId(),
+ callbacks_id,
+ waitable_results)),
waitable_results.get());
}
main_thread_loop_.get(),
&FileSystemDispatcher::DeleteFileSystem,
MakeTuple(GURL(storage_partition),
- static_cast<fileapi::FileSystemType>(type),
+ static_cast<storage::FileSystemType>(type),
base::Bind(&StatusCallbackAdapter,
- CurrentWorkerId(), callbacks_id, waitable_results)),
+ CurrentWorkerId(),
+ callbacks_id,
+ waitable_results)),
waitable_results.get());
}