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

Unified Diff: ppapi/native_client/src/trusted/plugin/temporary_file.cc

Issue 413493002: Pepper: Simplify TempFile in trusted plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/temporary_file.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..db0233596fe31e030a744fe9353b553fb61aff5d 100644
--- a/ppapi/native_client/src/trusted/plugin/temporary_file.cc
+++ b/ppapi/native_client/src/trusted/plugin/temporary_file.cc
@@ -18,20 +18,12 @@
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;
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/temporary_file.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698