OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/flash_file_resource.h" | 5 #include "ppapi/proxy/flash_file_resource.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "ipc/ipc_message.h" | 8 #include "ipc/ipc_message.h" |
9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
10 #include "ppapi/proxy/ppapi_messages.h" | 10 #include "ppapi/proxy/ppapi_messages.h" |
11 #include "ppapi/shared_impl/file_type_conversion.h" | 11 #include "ppapi/shared_impl/file_type_conversion.h" |
12 #include "ppapi/shared_impl/scoped_pp_var.h" | 12 #include "ppapi/shared_impl/scoped_pp_var.h" |
13 #include "ppapi/shared_impl/time_conversion.h" | 13 #include "ppapi/shared_impl/time_conversion.h" |
14 #include "ppapi/shared_impl/var.h" | 14 #include "ppapi/shared_impl/var.h" |
15 #include "ppapi/thunk/enter.h" | 15 #include "ppapi/thunk/enter.h" |
| 16 #include "ppapi/thunk/ppb_file_ref_api.h" |
16 | 17 |
17 namespace ppapi { | 18 namespace ppapi { |
18 namespace proxy { | 19 namespace proxy { |
19 | 20 |
20 namespace { | 21 namespace { |
21 | 22 |
22 // Returns the path that a PPB_FileRef resource references as long as it is an | 23 // Returns the path that a PPB_FileRef resource references as long as it is an |
23 // PP_FILESYSTEMTYPE_EXTERNAL path. Returns an empty string on error. | 24 // PP_FILESYSTEMTYPE_EXTERNAL path. Returns an empty string on error. |
24 std::string GetPathFromFileRef(PP_Resource file_ref) { | 25 std::string GetPathFromFileRef(PP_Resource file_ref) { |
25 thunk::EnterResourceNoLock<thunk::PPB_FileRef_API> enter(file_ref, true); | 26 thunk::EnterResourceNoLock<thunk::PPB_FileRef_API> enter(file_ref, true); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 info->type = PP_FILETYPE_DIRECTORY; | 222 info->type = PP_FILETYPE_DIRECTORY; |
222 else | 223 else |
223 info->type = PP_FILETYPE_REGULAR; | 224 info->type = PP_FILETYPE_REGULAR; |
224 } | 225 } |
225 | 226 |
226 return error; | 227 return error; |
227 } | 228 } |
228 | 229 |
229 } // namespace proxy | 230 } // namespace proxy |
230 } // namespace ppapi | 231 } // namespace ppapi |
OLD | NEW |