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

Unified Diff: webkit/plugins/ppapi/ppb_file_ref_impl.cc

Issue 12817009: Add Query() support to FileRef (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix memory leak Created 7 years, 9 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: webkit/plugins/ppapi/ppb_file_ref_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_file_ref_impl.cc b/webkit/plugins/ppapi/ppb_file_ref_impl.cc
index aacc016a8860384b75056349f637a36ab5d0187d..f781608ec0097038e599b7fa4aa8105eafeb2a49 100644
--- a/webkit/plugins/ppapi/ppb_file_ref_impl.cc
+++ b/webkit/plugins/ppapi/ppb_file_ref_impl.cc
@@ -293,5 +293,22 @@ bool PPB_FileRef_Impl::IsValidNonExternalFileSystem() const {
file_system_->type() != PP_FILESYSTEMTYPE_EXTERNAL;
}
+int32_t PPB_FileRef_Impl::Query(PP_FileInfo* info,
+ scoped_refptr<TrackedCallback> callback) {
+ if (!IsValidNonExternalFileSystem())
+ return PP_ERROR_NOACCESS;
dmichael (off chromium) 2013/03/21 22:11:29 Don't we want to support Query for external file s
+
+ PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this);
+ if (!plugin_instance)
+ return PP_ERROR_FAILED;
+
+ if (!plugin_instance->delegate()->Query(
+ GetFileSystemURL(),
+ new FileCallbacks(this, callback, info, file_system_)))
+ return PP_ERROR_FAILED;
+
+ return PP_OK_COMPLETIONPENDING;
+}
+
} // namespace ppapi
} // namespace webkit
« ppapi/proxy/ppb_file_ref_proxy.cc ('K') | « webkit/plugins/ppapi/ppb_file_ref_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698