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

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

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 | « components/nacl/browser/nacl_browser.h ('k') | components/nacl/browser/nacl_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/browser/nacl_browser.cc
diff --git a/components/nacl/browser/nacl_browser.cc b/components/nacl/browser/nacl_browser.cc
index 55b27de9c025cc1ad71c2cc8990f45f3b5f355bc..b8ba7ee4d8342210fff7975e234e01b64c642d9a 100644
--- a/components/nacl/browser/nacl_browser.cc
+++ b/components/nacl/browser/nacl_browser.cc
@@ -136,6 +136,50 @@ base::File OpenNaClReadExecImpl(const base::FilePath& file_path,
return file.Pass();
}
+OpenNaClFileReadExecImplResult::OpenNaClFileReadExecImplResult() {
+}
+
+OpenNaClFileReadExecImplResult::OpenNaClFileReadExecImplResult(
+ base::File file,
+ base::FilePath file_path)
+ : file_(file.Pass()),
+ file_path_(file_path) {
+}
+
+OpenNaClFileReadExecImplResult::~OpenNaClFileReadExecImplResult() {
+}
+
+OpenNaClFileReadExecImplResult::OpenNaClFileReadExecImplResult(RValue other)
+ : file_(other.object->file_.Pass()),
+ file_path_(other.object->file_path()) {
+}
+
+OpenNaClFileReadExecImplResult&
+OpenNaClFileReadExecImplResult::operator=(RValue other) {
+ if (this != other.object) {
+ file_ = other.object->file_.Pass();
+ file_path_ = other.object->file_path();
+ }
+ return *this;
+}
+
+bool OpenNaClFileReadExecImplResult::IsValid() const {
+ return file_.IsValid();
+}
+
+scoped_ptr<OpenNaClFileReadExecImplResult[]> OpenNaClFilesReadExecImpl(
+ const std::vector<base::FilePath>& file_paths, bool is_executable) {
+ DCHECK(!file_paths.empty());
+ scoped_ptr<OpenNaClFileReadExecImplResult[]> result(
+ new OpenNaClFileReadExecImplResult[file_paths.size()]);
+ for (size_t i = 0; i < file_paths.size(); ++i) {
+ result[i] = OpenNaClFileReadExecImplResult(
+ OpenNaClReadExecImpl(file_paths[i], is_executable).Pass(),
+ file_paths[i]).Pass();
+ }
+ return result.Pass();
+}
+
NaClBrowser::NaClBrowser()
: irt_filepath_(),
irt_state_(NaClResourceUninitialized),
« no previous file with comments | « components/nacl/browser/nacl_browser.h ('k') | components/nacl/browser/nacl_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698