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" | |
17 | 16 |
18 namespace ppapi { | 17 namespace ppapi { |
19 namespace proxy { | 18 namespace proxy { |
20 | 19 |
21 namespace { | 20 namespace { |
22 | 21 |
23 // Returns the path that a PPB_FileRef resource references as long as it is an | 22 // Returns the path that a PPB_FileRef resource references as long as it is an |
24 // PP_FILESYSTEMTYPE_EXTERNAL path. Returns an empty string on error. | 23 // PP_FILESYSTEMTYPE_EXTERNAL path. Returns an empty string on error. |
25 std::string GetPathFromFileRef(PP_Resource file_ref) { | 24 std::string GetPathFromFileRef(PP_Resource file_ref) { |
26 thunk::EnterResourceNoLock<thunk::PPB_FileRef_API> enter(file_ref, true); | 25 thunk::EnterResourceNoLock<thunk::PPB_FileRef_API> enter(file_ref, true); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 info->type = PP_FILETYPE_DIRECTORY; | 221 info->type = PP_FILETYPE_DIRECTORY; |
223 else | 222 else |
224 info->type = PP_FILETYPE_REGULAR; | 223 info->type = PP_FILETYPE_REGULAR; |
225 } | 224 } |
226 | 225 |
227 return error; | 226 return error; |
228 } | 227 } |
229 | 228 |
230 } // namespace proxy | 229 } // namespace proxy |
231 } // namespace ppapi | 230 } // namespace ppapi |
OLD | NEW |