| Index: webkit/plugins/ppapi/ppb_flash_impl.cc
|
| diff --git a/webkit/plugins/ppapi/ppb_flash_impl.cc b/webkit/plugins/ppapi/ppb_flash_impl.cc
|
| index 8b595ff594bc801603df41850222f41dc16d484d..ccc6a67f58e1dcfaf240c18284f9a9e4c1f45e5b 100644
|
| --- a/webkit/plugins/ppapi/ppb_flash_impl.cc
|
| +++ b/webkit/plugins/ppapi/ppb_flash_impl.cc
|
| @@ -523,6 +523,30 @@ int32_t PPB_Flash_Impl::GetDirContents(PP_Instance pp_instance,
|
| return PP_OK;
|
| }
|
|
|
| +int32_t PPB_Flash_Impl::CreateTemporaryFile(PP_Instance instance,
|
| + const char* dir_path,
|
| + PP_FileHandle* file,
|
| + std::string* file_name) {
|
| + if (!dir_path || !file || !file_name)
|
| + return PP_ERROR_BADARGUMENT;
|
| +
|
| + PluginInstance* plugin_instance = HostGlobals::Get()->GetInstance(instance);
|
| + if (!plugin_instance) {
|
| + *file = PP_kInvalidFileHandle;
|
| + file_name->clear();
|
| + return PP_ERROR_FAILED;
|
| + }
|
| +
|
| + base::PlatformFile temp_file = base::kInvalidPlatformFileValue;
|
| + base::PlatformFileError result =
|
| + plugin_instance->delegate()->CreateTemporaryFile(
|
| + ::ppapi::PepperFilePath::MakeModuleLocal(
|
| + plugin_instance->module()->name(), dir_path),
|
| + &temp_file, file_name);
|
| + *file = temp_file;
|
| + return ::ppapi::PlatformFileErrorToPepperError(result);
|
| +}
|
| +
|
| int32_t PPB_Flash_Impl::OpenFileRef(PP_Instance pp_instance,
|
| PP_Resource file_ref_id,
|
| int32_t mode,
|
|
|