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

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

Issue 393693004: Pepper: Delete FileDownloader in trusted plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: STL fix 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
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;
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/temporary_file.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698