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

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

Issue 1133303005: Non-SFI mode: Open primary IPC::Channel before seccomp-sandbox enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months 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 4d13d4ec231fc8df8d53a6832995776f103dfb7a..e14bbed111d786ddefdafba3cdf4871165512ea6 100644
--- a/components/nacl/loader/nonsfi/nonsfi_listener.cc
+++ b/components/nacl/loader/nonsfi/nonsfi_listener.cc
@@ -17,7 +17,6 @@
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_switches.h"
-#include "ipc/ipc_sync_channel.h"
#include "ppapi/nacl_irt/irt_manifest.h"
#include "ppapi/nacl_irt/plugin_startup.h"
@@ -37,22 +36,19 @@ namespace nonsfi {
NonSfiListener::NonSfiListener() : io_thread_("NaCl_IOThread"),
shutdown_event_(true, false),
key_fd_map_(new std::map<std::string, int>) {
- io_thread_.StartWithOptions(
- base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
+ channel_ = IPC::Channel::CreateClient(
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kProcessChannelID),
+ this); // As a listener.
}
NonSfiListener::~NonSfiListener() {
}
void NonSfiListener::Listen() {
- channel_ = IPC::SyncChannel::Create(
- base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kProcessChannelID),
- IPC::Channel::MODE_CLIENT,
- this, // As a Listener.
- io_thread_.message_loop_proxy().get(),
- true, // Create pipe now.
- &shutdown_event_);
+ io_thread_.StartWithOptions(
+ base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
+ CHECK(channel_->Connect());
base::MessageLoop::current()->Run();
}

Powered by Google App Engine
This is Rietveld 408576698