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

Unified Diff: ppapi/cpp/file_ref.cc

Issue 14784002: Move DirectoryReader::ReadEntries to FileRef::ReadDirectoryEntries (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: address dmichael's comments Created 7 years, 8 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: ppapi/cpp/file_ref.cc
diff --git a/ppapi/cpp/file_ref.cc b/ppapi/cpp/file_ref.cc
index 377fbbb04caeba6d52706acd681106a96771ee26..48e72ee3ab55ffbe7b0f8e4ad5a1b34e63accfc8 100644
--- a/ppapi/cpp/file_ref.cc
+++ b/ppapi/cpp/file_ref.cc
@@ -6,10 +6,10 @@
#include "ppapi/c/pp_errors.h"
#include "ppapi/cpp/completion_callback.h"
+#include "ppapi/cpp/directory_entry.h"
#include "ppapi/cpp/file_system.h"
#include "ppapi/cpp/module_impl.h"
-
namespace pp {
namespace {
@@ -170,5 +170,13 @@ int32_t FileRef::Query(const CompletionCallbackWithOutput<PP_FileInfo>& cc) {
pp_resource(), cc.output(), cc.pp_completion_callback());
}
+int32_t FileRef::ReadEntries(
+ const CompletionCallbackWithOutput< std::vector<DirectoryEntry> >&
palmer 2013/05/03 00:07:24 Style nit: No space between < std
hamaji 2013/05/03 01:10:34 Done.
+ callback) {
+ if (!has_interface<PPB_FileRef_1_1>())
+ return callback.MayForce(PP_ERROR_NOINTERFACE);
+ return get_interface<PPB_FileRef_1_1>()->ReadEntries(
+ pp_resource(), callback.output(), callback.pp_completion_callback());
+}
} // namespace pp

Powered by Google App Engine
This is Rietveld 408576698