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

Side by Side Diff: content/browser/renderer_host/pepper/pepper_external_file_ref_backend.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
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 "content/browser/renderer_host/pepper/pepper_external_file_ref_backend. h" 5 #include "content/browser/renderer_host/pepper/pepper_external_file_ref_backend. h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util_proxy.h" 8 #include "base/files/file_util_proxy.h"
9 #include "content/browser/child_process_security_policy_impl.h" 9 #include "content/browser/child_process_security_policy_impl.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 15 matching lines...) Expand all
26 weak_factory_(this) { 26 weak_factory_(this) {
27 task_runner_ = 27 task_runner_ =
28 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE); 28 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE);
29 } 29 }
30 30
31 PepperExternalFileRefBackend::~PepperExternalFileRefBackend() { 31 PepperExternalFileRefBackend::~PepperExternalFileRefBackend() {
32 } 32 }
33 33
34 int32_t PepperExternalFileRefBackend::MakeDirectory( 34 int32_t PepperExternalFileRefBackend::MakeDirectory(
35 ppapi::host::ReplyMessageContext reply_context, 35 ppapi::host::ReplyMessageContext reply_context,
36 bool make_ancestors) { 36 int32_t make_directory_flags) {
37 // This operation isn't supported for external filesystems. 37 // This operation isn't supported for external filesystems.
38 return PP_ERROR_NOACCESS; 38 return PP_ERROR_NOACCESS;
39 } 39 }
40 40
41 int32_t PepperExternalFileRefBackend::Touch( 41 int32_t PepperExternalFileRefBackend::Touch(
42 ppapi::host::ReplyMessageContext reply_context, 42 ppapi::host::ReplyMessageContext reply_context,
43 PP_Time last_access_time, 43 PP_Time last_access_time,
44 PP_Time last_modified_time) { 44 PP_Time last_modified_time) {
45 IPC::Message reply_msg = PpapiPluginMsg_FileRef_TouchReply(); 45 IPC::Message reply_msg = PpapiPluginMsg_FileRef_TouchReply();
46 base::FileUtilProxy::Touch( 46 base::FileUtilProxy::Touch(
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 file_info, PP_FILESYSTEMTYPE_EXTERNAL, &pp_file_info); 150 file_info, PP_FILESYSTEMTYPE_EXTERNAL, &pp_file_info);
151 } else { 151 } else {
152 memset(&pp_file_info, 0, sizeof(pp_file_info)); 152 memset(&pp_file_info, 0, sizeof(pp_file_info));
153 } 153 }
154 154
155 host_->SendReply(reply_context, 155 host_->SendReply(reply_context,
156 PpapiPluginMsg_FileRef_QueryReply(pp_file_info)); 156 PpapiPluginMsg_FileRef_QueryReply(pp_file_info));
157 } 157 }
158 158
159 } // namespace content 159 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698