OLD | NEW |
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_internal_file_ref_backend.
h" | 5 #include "content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.
h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
13 #include "base/files/file_util_proxy.h" | 13 #include "base/files/file_util_proxy.h" |
14 #include "content/browser/child_process_security_policy_impl.h" | |
15 #include "content/browser/fileapi/browser_file_system_helper.h" | 14 #include "content/browser/fileapi/browser_file_system_helper.h" |
16 #include "content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
" | 15 #include "content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
" |
| 16 #include "content/browser/shared/child_process_security_policy_helper.h" |
17 #include "content/public/browser/browser_context.h" | 17 #include "content/public/browser/browser_context.h" |
18 #include "content/public/browser/render_process_host.h" | 18 #include "content/public/browser/render_process_host.h" |
19 #include "content/public/browser/storage_partition.h" | 19 #include "content/public/browser/storage_partition.h" |
20 #include "net/base/escape.h" | 20 #include "net/base/escape.h" |
21 #include "ppapi/c/pp_errors.h" | 21 #include "ppapi/c/pp_errors.h" |
22 #include "ppapi/c/pp_file_info.h" | 22 #include "ppapi/c/pp_file_info.h" |
23 #include "ppapi/c/pp_instance.h" | 23 #include "ppapi/c/pp_instance.h" |
24 #include "ppapi/c/pp_resource.h" | 24 #include "ppapi/c/pp_resource.h" |
25 #include "ppapi/c/ppb_file_ref.h" | 25 #include "ppapi/c/ppb_file_ref.h" |
26 #include "ppapi/host/dispatch_host_message.h" | 26 #include "ppapi/host/dispatch_host_message.h" |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 ChildProcessSecurityPolicyImpl* policy = | 308 ChildProcessSecurityPolicyImpl* policy = |
309 ChildProcessSecurityPolicyImpl::GetInstance(); | 309 ChildProcessSecurityPolicyImpl::GetInstance(); |
310 if (!policy->CanReadFileSystemFile(render_process_id_, url) || | 310 if (!policy->CanReadFileSystemFile(render_process_id_, url) || |
311 !policy->CanWriteFileSystemFile(render_process_id_, url)) { | 311 !policy->CanWriteFileSystemFile(render_process_id_, url)) { |
312 return PP_ERROR_NOACCESS; | 312 return PP_ERROR_NOACCESS; |
313 } | 313 } |
314 return PP_OK; | 314 return PP_OK; |
315 } | 315 } |
316 | 316 |
317 } // namespace content | 317 } // namespace content |
OLD | NEW |