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

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

Issue 21966004: Pepper: Move FileRef to the "new" resource proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another rebase Created 7 years, 3 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/flash_drm_resource.cc ('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 (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
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
OLDNEW
« no previous file with comments | « ppapi/proxy/flash_drm_resource.cc ('k') | ppapi/proxy/interface_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698