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

Side by Side Diff: ppapi/proxy/file_ref_resource.cc

Issue 17948002: Update Linux to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
« no previous file with comments | « net/url_request/url_request.cc ('k') | ppapi/proxy/plugin_main_nacl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ppapi/proxy/file_ref_resource.h" 5 #include "ppapi/proxy/file_ref_resource.h"
6 6
7 #include "ppapi/c/pp_directory_entry.h" 7 #include "ppapi/c/pp_directory_entry.h"
8 #include "ppapi/c/pp_instance.h" 8 #include "ppapi/c/pp_instance.h"
9 #include "ppapi/c/pp_resource.h" 9 #include "ppapi/c/pp_resource.h"
10 #include "ppapi/proxy/ppapi_messages.h" 10 #include "ppapi/proxy/ppapi_messages.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // TODO(teravest): Remove this when we are finished moving to the new proxy. 204 // TODO(teravest): Remove this when we are finished moving to the new proxy.
205 int32_t FileRefResource::ReadDirectoryEntriesInHost( 205 int32_t FileRefResource::ReadDirectoryEntriesInHost(
206 linked_ptr<std::vector<ppapi::PPB_FileRef_CreateInfo> > files, 206 linked_ptr<std::vector<ppapi::PPB_FileRef_CreateInfo> > files,
207 linked_ptr<std::vector<PP_FileType> > file_types, 207 linked_ptr<std::vector<PP_FileType> > file_types,
208 scoped_refptr<TrackedCallback> callback) { 208 scoped_refptr<TrackedCallback> callback) {
209 NOTREACHED(); 209 NOTREACHED();
210 return PP_ERROR_FAILED; 210 return PP_ERROR_FAILED;
211 } 211 }
212 212
213 PP_Var FileRefResource::GetAbsolutePath() { 213 PP_Var FileRefResource::GetAbsolutePath() {
214 if (!absolute_path_var_) { 214 if (!absolute_path_var_.get()) {
215 std::string absolute_path; 215 std::string absolute_path;
216 int32_t result = SyncCall<PpapiPluginMsg_FileRef_GetAbsolutePathReply>( 216 int32_t result = SyncCall<PpapiPluginMsg_FileRef_GetAbsolutePathReply>(
217 BROWSER, PpapiHostMsg_FileRef_GetAbsolutePath(), &absolute_path); 217 BROWSER, PpapiHostMsg_FileRef_GetAbsolutePath(), &absolute_path);
218 if (result != PP_OK) 218 if (result != PP_OK)
219 return PP_MakeUndefined(); 219 return PP_MakeUndefined();
220 absolute_path_var_ = new StringVar(absolute_path); 220 absolute_path_var_ = new StringVar(absolute_path);
221 } 221 }
222 return absolute_path_var_->GetPPVar(); 222 return absolute_path_var_->GetPPVar();
223 } 223 }
224 224
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 entries.push_back(entry); 268 entries.push_back(entry);
269 } 269 }
270 270
271 writer.StoreVector(entries); 271 writer.StoreVector(entries);
272 } 272 }
273 callback->Run(params.result()); 273 callback->Run(params.result());
274 } 274 }
275 275
276 } // namespace proxy 276 } // namespace proxy
277 } // namespace ppapi 277 } // namespace ppapi
OLDNEW
« no previous file with comments | « net/url_request/url_request.cc ('k') | ppapi/proxy/plugin_main_nacl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698