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

Unified Diff: components/nacl/loader/nonsfi/nonsfi_listener.cc

Issue 649603004: Non-SFI NaCl: Batch-open resource files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ipc/ and mojo/ changes following Mark's suggestion Created 6 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 side-by-side diff with in-line comments
Download patch
Index: components/nacl/loader/nonsfi/nonsfi_listener.cc
diff --git a/components/nacl/loader/nonsfi/nonsfi_listener.cc b/components/nacl/loader/nonsfi/nonsfi_listener.cc
index 09f30b28f7dfa982294b7c96eb30271e3d653459..43cf8e66bc9e1673cecd9d82986365866287df45 100644
--- a/components/nacl/loader/nonsfi/nonsfi_listener.cc
+++ b/components/nacl/loader/nonsfi/nonsfi_listener.cc
@@ -33,6 +33,9 @@
namespace nacl {
namespace nonsfi {
+void RegisterPreopenedDescriptors(
+ const std::vector<std::pair<std::string, int> >& key_fd_pairs);
+
NonSfiListener::NonSfiListener() : io_thread_("NaCl_IOThread"),
shutdown_event_(true, false) {
io_thread_.StartWithOptions(
@@ -156,6 +159,18 @@ void NonSfiListener::OnStart(const nacl::NaClStartParams& params) {
CHECK(params.nexe_file != IPC::InvalidPlatformFileForTransit());
CHECK(params.nexe_file_path_metadata.empty());
+#if !defined(OS_NACL_NONSFI)
hidehiko 2015/01/28 09:05:19 When we move the irt implementation to ppapi/nacl_
Mark Seaborn 2015/02/02 23:21:50 I don't understand why you need to conditionalise
Yusuke Sato 2015/02/04 02:00:29 removed
Yusuke Sato 2015/02/04 02:00:29 removed
+ std::vector<std::pair<std::string, int> > key_fd_pairs;
Mark Seaborn 2015/02/02 23:21:50 You're converting to a std::vector here only to ha
Yusuke Sato 2015/02/04 02:00:29 Since params.resource_files is a struct defined in
Mark Seaborn 2015/02/04 18:52:16 I think it would be OK to add components/nacl/comm
Yusuke Sato 2015/02/05 07:21:13 Done.
+ for (size_t i = 0; i < params.resource_files.size(); ++i) {
+ key_fd_pairs.push_back(std::make_pair(
+ params.resource_files[i].file_key,
+ IPC::PlatformFileForTransitToPlatformFile(
+ params.resource_files[i].file)));
+ }
+
+ RegisterPreopenedDescriptors(key_fd_pairs);
+#endif
+
MainStart(IPC::PlatformFileForTransitToPlatformFile(params.nexe_file));
}

Powered by Google App Engine
This is Rietveld 408576698