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

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

Issue 113363004: PPAPI: Add new PPB_FileRef.MakeDirectory to support exclusive operation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
« no previous file with comments | « ppapi/proxy/file_ref_resource.h ('k') | ppapi/proxy/interface_list.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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 parent_info.display_name = GetNameForInternalFilePath(parent_path); 122 parent_info.display_name = GetNameForInternalFilePath(parent_path);
123 parent_info.file_system_plugin_resource = 123 parent_info.file_system_plugin_resource =
124 create_info_.file_system_plugin_resource; 124 create_info_.file_system_plugin_resource;
125 125
126 return (new FileRefResource(connection(), 126 return (new FileRefResource(connection(),
127 pp_instance(), 127 pp_instance(),
128 parent_info))->GetReference(); 128 parent_info))->GetReference();
129 } 129 }
130 130
131 int32_t FileRefResource::MakeDirectory( 131 int32_t FileRefResource::MakeDirectory(
132 PP_Bool make_ancestors, 132 int32_t make_directory_flags,
133 scoped_refptr<TrackedCallback> callback) { 133 scoped_refptr<TrackedCallback> callback) {
134 Call<PpapiPluginMsg_FileRef_MakeDirectoryReply>( 134 Call<PpapiPluginMsg_FileRef_MakeDirectoryReply>(
135 BROWSER, 135 BROWSER,
136 PpapiHostMsg_FileRef_MakeDirectory(PP_TRUE == make_ancestors), 136 PpapiHostMsg_FileRef_MakeDirectory(make_directory_flags),
137 base::Bind(&FileRefResource::RunTrackedCallback, this, callback)); 137 base::Bind(&FileRefResource::RunTrackedCallback, this, callback));
138 return PP_OK_COMPLETIONPENDING; 138 return PP_OK_COMPLETIONPENDING;
139 } 139 }
140 140
141 int32_t FileRefResource::Touch(PP_Time last_access_time, 141 int32_t FileRefResource::Touch(PP_Time last_access_time,
142 PP_Time last_modified_time, 142 PP_Time last_modified_time,
143 scoped_refptr<TrackedCallback> callback) { 143 scoped_refptr<TrackedCallback> callback) {
144 Call<PpapiPluginMsg_FileRef_TouchReply>( 144 Call<PpapiPluginMsg_FileRef_TouchReply>(
145 BROWSER, 145 BROWSER,
146 PpapiHostMsg_FileRef_Touch(last_access_time, 146 PpapiHostMsg_FileRef_Touch(last_access_time,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 entries.push_back(entry); 251 entries.push_back(entry);
252 } 252 }
253 253
254 writer.StoreVector(entries); 254 writer.StoreVector(entries);
255 } 255 }
256 callback->Run(params.result()); 256 callback->Run(params.result());
257 } 257 }
258 258
259 } // namespace proxy 259 } // namespace proxy
260 } // namespace ppapi 260 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/file_ref_resource.h ('k') | ppapi/proxy/interface_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698