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), |