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

Side by Side Diff: webkit/plugins/ppapi/ppb_directory_reader_impl.cc

Issue 9015009: Use the new callback tracker and delete the old one (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_directory_reader_impl.h" 5 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "ppapi/c/pp_completion_callback.h" 9 #include "ppapi/c/pp_completion_callback.h"
10 #include "ppapi/c/pp_errors.h" 10 #include "ppapi/c/pp_errors.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 if (FillUpEntry()) { 90 if (FillUpEntry()) {
91 entry_ = NULL; 91 entry_ = NULL;
92 return PP_OK; 92 return PP_OK;
93 } 93 }
94 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); 94 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this);
95 if (!plugin_instance) 95 if (!plugin_instance)
96 return PP_ERROR_FAILED; 96 return PP_ERROR_FAILED;
97 97
98 if (!plugin_instance->delegate()->ReadDirectory( 98 if (!plugin_instance->delegate()->ReadDirectory(
99 directory_ref_->GetFileSystemURL(), 99 directory_ref_->GetFileSystemURL(),
100 new FileCallbacks(plugin_instance->module()->AsWeakPtr(), 100 new FileCallbacks(this, callback, NULL, NULL, this)))
101 pp_resource(), callback, NULL, NULL, this)))
102 return PP_ERROR_FAILED; 101 return PP_ERROR_FAILED;
103 102
104 return PP_OK_COMPLETIONPENDING; 103 return PP_OK_COMPLETIONPENDING;
105 } 104 }
106 105
107 void PPB_DirectoryReader_Impl::AddNewEntries( 106 void PPB_DirectoryReader_Impl::AddNewEntries(
108 const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more) { 107 const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more) {
109 DCHECK(!entries.empty() || !has_more); 108 DCHECK(!entries.empty() || !has_more);
110 has_more_ = has_more; 109 has_more_ = has_more;
111 110
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 if (!has_more_) { 148 if (!has_more_) {
150 entry_->file_ref = 0; 149 entry_->file_ref = 0;
151 return true; 150 return true;
152 } 151 }
153 152
154 return false; 153 return false;
155 } 154 }
156 155
157 } // namespace ppapi 156 } // namespace ppapi
158 } // namespace webkit 157 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698