OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 entry_ = entry; | 106 entry_ = entry; |
107 if (FillUpEntry()) { | 107 if (FillUpEntry()) { |
108 entry_ = NULL; | 108 entry_ = NULL; |
109 return PP_OK; | 109 return PP_OK; |
110 } | 110 } |
111 | 111 |
112 PluginInstance* instance = directory_ref_->GetFileSystem()->instance(); | 112 PluginInstance* instance = directory_ref_->GetFileSystem()->instance(); |
113 PP_Resource resource_id = GetReferenceNoAddRef(); | 113 PP_Resource resource_id = GetReferenceNoAddRef(); |
114 DCHECK(resource_id != 0); | 114 DCHECK(resource_id != 0); |
115 if (!instance->delegate()->ReadDirectory( | 115 if (!instance->delegate()->ReadDirectory( |
116 directory_ref_->GetSystemPath(), | 116 directory_ref_->GetFileSystemURL(), |
117 new FileCallbacks(instance->module()->AsWeakPtr(), | 117 new FileCallbacks(instance->module()->AsWeakPtr(), |
118 resource_id, | 118 resource_id, |
119 callback, NULL, NULL, this))) | 119 callback, NULL, NULL, this))) |
120 return PP_ERROR_FAILED; | 120 return PP_ERROR_FAILED; |
121 | 121 |
122 return PP_ERROR_WOULDBLOCK; | 122 return PP_ERROR_WOULDBLOCK; |
123 } | 123 } |
124 | 124 |
125 void PPB_DirectoryReader_Impl::AddNewEntries( | 125 void PPB_DirectoryReader_Impl::AddNewEntries( |
126 const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more) { | 126 const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 entry_->file_ref = 0; | 162 entry_->file_ref = 0; |
163 return true; | 163 return true; |
164 } | 164 } |
165 | 165 |
166 return false; | 166 return false; |
167 } | 167 } |
168 | 168 |
169 } // namespace ppapi | 169 } // namespace ppapi |
170 } // namespace webkit | 170 } // namespace webkit |
171 | 171 |
OLD | NEW |