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

Side by Side Diff: components/nacl/renderer/plugin/temporary_file.h

Issue 1512733003: PNaCl: Use Chrome IPC to talk to the linker process, instead of SRPC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase + cleanup Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_NACL_RENDERER_PLUGIN_TEMPORARY_FILE_H_ 5 #ifndef COMPONENTS_NACL_RENDERER_PLUGIN_TEMPORARY_FILE_H_
6 #define COMPONENTS_NACL_RENDERER_PLUGIN_TEMPORARY_FILE_H_ 6 #define COMPONENTS_NACL_RENDERER_PLUGIN_TEMPORARY_FILE_H_
7 7
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "native_client/src/include/nacl_macros.h" 10 #include "native_client/src/include/nacl_macros.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Accessors. 51 // Accessors.
52 // The nacl::DescWrapper* for the writeable version of the file. 52 // The nacl::DescWrapper* for the writeable version of the file.
53 nacl::DescWrapper* write_wrapper() { return write_wrapper_.get(); } 53 nacl::DescWrapper* write_wrapper() { return write_wrapper_.get(); }
54 nacl::DescWrapper* read_wrapper() { return read_wrapper_.get(); } 54 nacl::DescWrapper* read_wrapper() { return read_wrapper_.get(); }
55 55
56 // Returns a handle to the file, transferring ownership of it. Note that 56 // Returns a handle to the file, transferring ownership of it. Note that
57 // the objects returned by write_wrapper() and read_wrapper() remain 57 // the objects returned by write_wrapper() and read_wrapper() remain
58 // valid after TakeFileHandle() is called. 58 // valid after TakeFileHandle() is called.
59 PP_FileHandle TakeFileHandle(); 59 PP_FileHandle TakeFileHandle();
60 60
61 // Returns a handle to the file, without transferring ownership of it.
62 // This handle remain valid until the TempFile object is destroyed or
bbudge 2015/12/16 20:30:06 nit: remains
Mark Seaborn 2015/12/17 06:09:56 Done.
63 // TakeFileHandle() is called.
64 PP_FileHandle GetFileHandle();
65
61 private: 66 private:
62 NACL_DISALLOW_COPY_AND_ASSIGN(TempFile); 67 NACL_DISALLOW_COPY_AND_ASSIGN(TempFile);
63 68
64 nacl::DescWrapper* MakeDescWrapper(int nacl_file_flags); 69 nacl::DescWrapper* MakeDescWrapper(int nacl_file_flags);
65 70
66 Plugin* plugin_; 71 Plugin* plugin_;
67 scoped_ptr<nacl::DescWrapper> read_wrapper_; 72 scoped_ptr<nacl::DescWrapper> read_wrapper_;
68 scoped_ptr<nacl::DescWrapper> write_wrapper_; 73 scoped_ptr<nacl::DescWrapper> write_wrapper_;
69 base::File file_handle_; 74 base::File file_handle_;
70 }; 75 };
71 76
72 } // namespace plugin 77 } // namespace plugin
73 78
74 #endif // COMPONENTS_NACL_RENDERER_PLUGIN_TEMPORARY_FILE_H_ 79 #endif // COMPONENTS_NACL_RENDERER_PLUGIN_TEMPORARY_FILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698