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

Unified Diff: components/nacl/browser/nacl_browser.h

Issue 728113002: obsolete: SFI NaCl: Batch-open resource files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years, 1 month 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 | « no previous file | components/nacl/browser/nacl_browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « no previous file | components/nacl/browser/nacl_browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698