diff options
Diffstat (limited to 'webkit/glue/plugins/pepper_file_io.cc')
-rw-r--r-- | webkit/glue/plugins/pepper_file_io.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/webkit/glue/plugins/pepper_file_io.cc b/webkit/glue/plugins/pepper_file_io.cc index 9090f88..b979ac2 100644 --- a/webkit/glue/plugins/pepper_file_io.cc +++ b/webkit/glue/plugins/pepper_file_io.cc @@ -25,7 +25,7 @@ namespace pepper { namespace { PP_Resource Create(PP_Module module_id) { - PluginModule* module = PluginModule::FromPPModule(module_id); + PluginModule* module = ResourceTracker::Get()->GetModule(module_id); if (!module) return 0; @@ -225,12 +225,11 @@ int32_t FileIO::Open(FileRef* file_ref, flags |= base::PLATFORM_FILE_WRITE; flags |= base::PLATFORM_FILE_WRITE_ATTRIBUTES; } + if (open_flags & PP_FILEOPENFLAG_TRUNCATE) { - DCHECK(flags & PP_FILEOPENFLAG_WRITE); + DCHECK(open_flags & PP_FILEOPENFLAG_WRITE); flags |= base::PLATFORM_FILE_TRUNCATE; - } - - if (open_flags & PP_FILEOPENFLAG_CREATE) { + } else if (open_flags & PP_FILEOPENFLAG_CREATE) { if (open_flags & PP_FILEOPENFLAG_EXCLUSIVE) flags |= base::PLATFORM_FILE_CREATE; else @@ -238,9 +237,9 @@ int32_t FileIO::Open(FileRef* file_ref, } else flags |= base::PLATFORM_FILE_OPEN; - file_system_type_ = file_ref->file_system_type(); + file_system_type_ = file_ref->GetFileSystemType(); if (!delegate_->AsyncOpenFile( - file_ref->system_path(), flags, + file_ref->GetSystemPath(), flags, callback_factory_.NewCallback(&FileIO::AsyncOpenFileCallback))) return PP_ERROR_FAILED; |