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

Side by Side Diff: webkit/plugins/ppapi/ppb_file_ref_impl.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, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" 5 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h"
6 6
7 #include "base/platform_file.h" 7 #include "base/platform_file.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 GetFileSystemURL(), 403 GetFileSystemURL(),
404 new FileCallbacks(this, callback, info, 404 new FileCallbacks(this, callback, info,
405 delegate->GetFileSystemType(pp_instance(), 405 delegate->GetFileSystemType(pp_instance(),
406 file_system_)))) 406 file_system_))))
407 return PP_ERROR_FAILED; 407 return PP_ERROR_FAILED;
408 408
409 } 409 }
410 return PP_OK_COMPLETIONPENDING; 410 return PP_OK_COMPLETIONPENDING;
411 } 411 }
412 412
413 int32_t PPB_FileRef_Impl::ReadEntries(
414 const PP_ArrayOutput& output,
415 scoped_refptr<TrackedCallback> callback) {
416 NOTREACHED();
417 return PP_ERROR_FAILED;
418 }
419
420 int32_t PPB_FileRef_Impl::ReadEntriesInHost(
421 std::vector< ::ppapi::PPB_FileRef_CreateInfo>* files,
422 std::vector<PP_FileType>* file_types,
423 scoped_refptr<TrackedCallback> callback) {
424 if (!IsValidNonExternalFileSystem())
425 return PP_ERROR_NOACCESS;
426
427 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this);
428 if (!plugin_instance)
429 return PP_ERROR_FAILED;
430
431 FileCallbacks::ReadEntriesParams params;
432 params.dir_ref = this;
433 params.files = files;
434 params.file_types = file_types;
435
436 if (!plugin_instance->delegate()->ReadEntries(
437 GetFileSystemURL(),
438 new FileCallbacks(this, callback, params)))
439 return PP_ERROR_FAILED;
440 return PP_OK_COMPLETIONPENDING;
441 }
442
413 } // namespace ppapi 443 } // namespace ppapi
414 } // namespace webkit 444 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698