| Index: ppapi/native_client/src/trusted/plugin/temporary_file.cc
|
| diff --git a/ppapi/native_client/src/trusted/plugin/temporary_file.cc b/ppapi/native_client/src/trusted/plugin/temporary_file.cc
|
| index eee655f40bec8de405af0e44c90f61088703dbfb..7f550b9cb618e67d7757ae71c84b38664fd5e06a 100644
|
| --- a/ppapi/native_client/src/trusted/plugin/temporary_file.cc
|
| +++ b/ppapi/native_client/src/trusted/plugin/temporary_file.cc
|
| @@ -18,20 +18,13 @@
|
|
|
| namespace plugin {
|
|
|
| -TempFile::TempFile(Plugin* plugin) : plugin_(plugin),
|
| - internal_handle_(PP_kInvalidFileHandle) {
|
| -}
|
| +TempFile::TempFile(Plugin* plugin, PP_FileHandle handle)
|
| + : plugin_(plugin),
|
| + internal_handle_(handle) { }
|
|
|
| TempFile::~TempFile() { }
|
|
|
| int32_t TempFile::Open(bool writeable) {
|
| - // TODO(teravest): Clean up this Open() behavior; this is really confusing as
|
| - // written.
|
| - if (internal_handle_ == PP_kInvalidFileHandle) {
|
| - internal_handle_ =
|
| - plugin_->nacl_interface()->CreateTemporaryFile(plugin_->pp_instance());
|
| - }
|
| -
|
| if (internal_handle_ == PP_kInvalidFileHandle) {
|
| PLUGIN_PRINTF(("TempFile::Open failed w/ PP_kInvalidFileHandle\n"));
|
| return PP_ERROR_FAILED;
|
|
|