| Index: components/nacl/browser/nacl_browser.h
|
| diff --git a/components/nacl/browser/nacl_browser.h b/components/nacl/browser/nacl_browser.h
|
| index 21e3ac7504e70c63046beccff483145837f6334e..761da11915567ec88bc23542b1611a55357c781c 100644
|
| --- a/components/nacl/browser/nacl_browser.h
|
| +++ b/components/nacl/browser/nacl_browser.h
|
| @@ -28,11 +28,39 @@ namespace nacl {
|
| static const int kGdbDebugStubPortUnknown = -1;
|
| static const int kGdbDebugStubPortUnused = 0;
|
|
|
| +class OpenNaClFileReadExecImplResult {
|
| + MOVE_ONLY_TYPE_FOR_CPP_03(OpenNaClFileReadExecImplResult, RValue);
|
| +
|
| + public:
|
| + OpenNaClFileReadExecImplResult();
|
| + OpenNaClFileReadExecImplResult(base::File file, base::FilePath file_path);
|
| + ~OpenNaClFileReadExecImplResult();
|
| +
|
| + OpenNaClFileReadExecImplResult(RValue other);
|
| + OpenNaClFileReadExecImplResult& operator=(RValue other);
|
| +
|
| + bool IsValid() const;
|
| +
|
| + base::File file() { return file_.Pass(); }
|
| + base::FilePath file_path() { return file_path_; }
|
| +
|
| + private:
|
| + base::File file_;
|
| + base::FilePath file_path_;
|
| +};
|
| +
|
| // Open an immutable executable file that can be mmapped (or a read-only file).
|
| // This function should only be called on a thread that can perform file IO.
|
| base::File OpenNaClReadExecImpl(const base::FilePath& file_path,
|
| bool is_executable);
|
|
|
| +// The same as OpenNaClReadExecImpl except that this one opens all files in
|
| +// the vector at once. Returns an array of length |file_paths.length()|. The
|
| +// returned array may contain invalid base::File object(s) when one or more
|
| +// files in |file_paths| are not found.
|
| +scoped_ptr<OpenNaClFileReadExecImplResult[]> OpenNaClFilesReadExecImpl(
|
| + const std::vector<base::FilePath>& file_paths, bool is_executable);
|
| +
|
| // Represents shared state for all NaClProcessHost objects in the browser.
|
| class NaClBrowser {
|
| public:
|
|
|