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

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

Issue 299143004: Pepper: TempFile cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 6 years, 7 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.h
diff --git a/ppapi/native_client/src/trusted/plugin/temporary_file.h b/ppapi/native_client/src/trusted/plugin/temporary_file.h
index fcfc7df4ad7eeba508463613653d6aa60b413598..7f6f563e72320430d34b0e7fa828896e6b04ac4d 100644
--- a/ppapi/native_client/src/trusted/plugin/temporary_file.h
+++ b/ppapi/native_client/src/trusted/plugin/temporary_file.h
@@ -43,7 +43,7 @@ class TempFile {
// Opens a temporary file object and descriptor wrapper referring to the file.
// If |writeable| is true, the descriptor will be opened for writing, and
// write_wrapper will return a valid pointer, otherwise it will return NULL.
- void Open(const pp::CompletionCallback& cb, bool writeable);
+ int32_t Open(bool writeable);
// Resets file position of the handle, for reuse.
bool Reset();
@@ -51,10 +51,12 @@ class TempFile {
// The nacl::DescWrapper* for the writeable version of the file.
nacl::DescWrapper* write_wrapper() { return write_wrapper_.get(); }
nacl::DescWrapper* read_wrapper() { return read_wrapper_.get(); }
- nacl::DescWrapper* release_read_wrapper() {
- return read_wrapper_.release();
- }
+ // Returns the handle to the file repesented and resets the internal handle
+ // and all wrappers.
+ PP_FileHandle TakeFileHandle();
+
+ // Used by GetNexeFd() to set the underlying internal handle.
PP_FileHandle* existing_handle() { return &existing_handle_; }
jvoung (off chromium) 2014/05/23 17:53:04 Maybe call this "internal_handle" ?
private:

Powered by Google App Engine
This is Rietveld 408576698