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: trunk/src/content/child/fileapi/webfilesystem_callback_adapters.cc

Issue 21334002: Revert 214160 "Implement Worker-MainThread bridge for FileSystem..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 5 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: trunk/src/content/child/fileapi/webfilesystem_callback_adapters.cc
===================================================================
--- trunk/src/content/child/fileapi/webfilesystem_callback_adapters.cc (revision 214597)
+++ trunk/src/content/child/fileapi/webfilesystem_callback_adapters.cc (working copy)
@@ -35,6 +35,37 @@
callbacks->didFail(::fileapi::PlatformFileErrorToWebFileError(error));
}
+void ReadMetadataCallbackAdapter(
+ WebKit::WebFileSystemCallbacks* callbacks,
+ const base::PlatformFileInfo& file_info) {
+ WebFileInfo web_file_info;
+ webkit_glue::PlatformFileInfoToWebFileInfo(file_info, &web_file_info);
+ callbacks->didReadMetadata(web_file_info);
+}
+
+void CreateSnapshotFileCallbackAdapter(
+ WebKit::WebFileSystemCallbacks* callbacks,
+ const base::PlatformFileInfo& file_info,
+ const base::FilePath& platform_path) {
+ WebFileInfo web_file_info;
+ webkit_glue::PlatformFileInfoToWebFileInfo(file_info, &web_file_info);
+ web_file_info.platformPath = platform_path.AsUTF16Unsafe();
+ callbacks->didCreateSnapshotFile(web_file_info);
+}
+
+void ReadDirectoryCallbackAdapater(
+ WebKit::WebFileSystemCallbacks* callbacks,
+ const std::vector<fileapi::DirectoryEntry>& entries,
+ bool has_more) {
+ WebVector<WebFileSystemEntry> file_system_entries(entries.size());
+ for (size_t i = 0; i < entries.size(); i++) {
+ file_system_entries[i].name =
+ base::FilePath(entries[i].name).AsUTF16Unsafe();
+ file_system_entries[i].isDirectory = entries[i].is_directory;
+ }
+ callbacks->didReadDirectory(file_system_entries, has_more);
+}
+
void OpenFileSystemCallbackAdapter(
WebKit::WebFileSystemCallbacks* callbacks,
const std::string& name, const GURL& root) {
Property changes on: trunk/src/content/child/fileapi/webfilesystem_callback_adapters.cc
___________________________________________________________________
Added: svn:mergeinfo

Powered by Google App Engine
This is Rietveld 408576698