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

Unified Diff: tools/ipc_fuzzer/replay/replay_process.cc

Issue 885143002: IPC Fuzzer: Make ChannelMojo work when --enable-channel-mojo is givne (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « tools/ipc_fuzzer/replay/replay.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ipc_fuzzer/replay/replay_process.cc
diff --git a/tools/ipc_fuzzer/replay/replay_process.cc b/tools/ipc_fuzzer/replay/replay_process.cc
index 6f85a06a38a939ba7f5a811b03bdf9733eba9a50..0b897772d288516bc525890723ab305ad4264d5d 100644
--- a/tools/ipc_fuzzer/replay/replay_process.cc
+++ b/tools/ipc_fuzzer/replay/replay_process.cc
@@ -14,6 +14,7 @@
#include "chrome/common/chrome_switches.h"
#include "ipc/ipc_descriptors.h"
#include "ipc/ipc_switches.h"
+#include "ipc/mojo/ipc_channel_mojo.h"
namespace ipc_fuzzer {
@@ -66,10 +67,19 @@ void ReplayProcess::OpenChannel() {
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kProcessChannelID);
- channel_ = IPC::ChannelProxy::Create(channel_name,
- IPC::Channel::MODE_CLIENT,
- this,
- io_thread_.message_loop_proxy());
+ bool should_use_mojo = base::CommandLine::ForCurrentProcess()->HasSwitch(
Tom Sepez 2015/01/29 23:41:15 isn't this now hard-wired to true independent of t
+ "enable-channel-mojo");
+ if (should_use_mojo) {
+ channel_ = IPC::ChannelProxy::Create(
+ IPC::ChannelMojo::CreateClientFactory(channel_name),
+ this,
+ io_thread_.message_loop_proxy());
+ } else {
+ channel_ = IPC::ChannelProxy::Create(channel_name,
+ IPC::Channel::MODE_CLIENT,
+ this,
+ io_thread_.message_loop_proxy());
+ }
}
bool ReplayProcess::OpenTestcase() {
« no previous file with comments | « tools/ipc_fuzzer/replay/replay.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698