diff options
author | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-04 20:24:39 +0000 |
---|---|---|
committer | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-04 20:24:39 +0000 |
commit | 416d0937f8ffde4a12c9b8dce601bff045dff5d0 (patch) | |
tree | 731c53b6203324e54bcf84f54d48618a116db9f0 /webkit/plugins/ppapi/ppb_file_ref_impl.cc | |
parent | a5f53a2038e64d9bb9377a3b4ef07eb226fae3b0 (diff) | |
download | chromium_src-416d0937f8ffde4a12c9b8dce601bff045dff5d0.zip chromium_src-416d0937f8ffde4a12c9b8dce601bff045dff5d0.tar.gz chromium_src-416d0937f8ffde4a12c9b8dce601bff045dff5d0.tar.bz2 |
Pepper: Refactor FileInfo conversions.
FileRef and FileIO both convert base::PlatformFileInfo to PP_FileInfo. I ran
into this while I was about to reimplement the same thing in the FileRef
refactor, and figured I may as well break out this simple refactor to its own
change.
BUG=
Review URL: https://chromiumcodereview.appspot.com/16140025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204027 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi/ppb_file_ref_impl.cc')
-rw-r--r-- | webkit/plugins/ppapi/ppb_file_ref_impl.cc | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/webkit/plugins/ppapi/ppb_file_ref_impl.cc b/webkit/plugins/ppapi/ppb_file_ref_impl.cc index 2bd1eab..c3d810d 100644 --- a/webkit/plugins/ppapi/ppb_file_ref_impl.cc +++ b/webkit/plugins/ppapi/ppb_file_ref_impl.cc @@ -97,22 +97,7 @@ void PlatformFileInfoToPPFileInfo( PP_FileSystemType file_system_type, PP_FileInfo* info) { DCHECK(info); - - info->size = file_info.size; - info->system_type = file_system_type; - info->creation_time = ::ppapi::TimeToPPTime(file_info.creation_time); - info->last_access_time = ::ppapi::TimeToPPTime(file_info.last_accessed); - info->last_modified_time = ::ppapi::TimeToPPTime(file_info.last_modified); - - if (file_info.is_symbolic_link) { - // Only external filesystem may have symbolic link files. - DCHECK_EQ(PP_FILESYSTEMTYPE_EXTERNAL, file_system_type); - info->type = PP_FILETYPE_OTHER; - } else if (file_info.is_directory) { - info->type = PP_FILETYPE_DIRECTORY; - } else { - info->type = PP_FILETYPE_REGULAR; - } + ::ppapi::PlatformFileInfoToPepperFileInfo(file_info, file_system_type, info); } void GetFileInfoCallback( |