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

Unified Diff: content/child/fileapi/webfilesystem_impl.cc

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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
« no previous file with comments | « content/child/fileapi/file_system_dispatcher.cc ('k') | content/child/fileapi/webfilewriter_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/fileapi/webfilesystem_impl.cc
diff --git a/content/child/fileapi/webfilesystem_impl.cc b/content/child/fileapi/webfilesystem_impl.cc
index e629fdd4a29364173b0a4d16d83bc5787f5a5e29..1c7966d43f3a4fee0b80ef65fcd9b60941225f74 100644
--- a/content/child/fileapi/webfilesystem_impl.cc
+++ b/content/child/fileapi/webfilesystem_impl.cc
@@ -23,8 +23,8 @@
#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"
+#include "storage/common/fileapi/directory_entry.h"
+#include "storage/common/fileapi/file_system_util.h"
using blink::WebFileInfo;
using blink::WebFileSystemCallbacks;
@@ -140,8 +140,9 @@ void DidReadMetadata(const base::File::Info& file_info,
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 =
@@ -156,13 +157,12 @@ void DidOpenFileSystem(const base::string16& name, const GURL& root,
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,
@@ -172,7 +172,7 @@ void DidResolveURL(
}
void DidFail(base::File::Error error, WebFileSystemCallbacks* callbacks) {
- callbacks->didFail(fileapi::FileErrorToWebFileError(error));
+ callbacks->didFail(storage::FileErrorToWebFileError(error));
}
// Run WebFileSystemCallbacks's |method| with |params|.
@@ -236,13 +236,14 @@ void OpenFileSystemCallbackAdapter(
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,
@@ -277,8 +278,10 @@ void ReadMetadataCallbackAdapter(int thread_id, int callbacks_id,
}
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,
@@ -410,11 +413,15 @@ void WebFileSystemImpl::openFileSystem(
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());
}
@@ -446,9 +453,11 @@ void WebFileSystemImpl::deleteFileSystem(
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());
}
« no previous file with comments | « content/child/fileapi/file_system_dispatcher.cc ('k') | content/child/fileapi/webfilewriter_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698