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

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

Issue 2389193004: Always use ChannelMojo for content child processes. (Closed)
Patch Set: Created 4 years, 2 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/fuzzer/fuzzer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ipc_fuzzer/message_replay/replay_process.cc
diff --git a/tools/ipc_fuzzer/message_replay/replay_process.cc b/tools/ipc_fuzzer/message_replay/replay_process.cc
index 9e097fcf63580c733bc36be2ad69207bae50fc0b..1d79cc90119145eaef2de71cca2802dcb515d31c 100644
--- a/tools/ipc_fuzzer/message_replay/replay_process.cc
+++ b/tools/ipc_fuzzer/message_replay/replay_process.cc
@@ -19,7 +19,6 @@
#include "content/public/common/mojo_channel_switches.h"
#include "ipc/ipc_channel_mojo.h"
#include "ipc/ipc_descriptors.h"
-#include "ipc/ipc_switches.h"
#include "mojo/edk/embedder/embedder.h"
#include "mojo/edk/embedder/platform_channel_pair.h"
#include "mojo/edk/embedder/scoped_ipc_support.h"
@@ -103,31 +102,13 @@ bool ReplayProcess::Initialize(int argc, const char** argv) {
}
void ReplayProcess::OpenChannel() {
- // TODO(morrita): As the adoption of ChannelMojo spreads, this
- // criteria has to be updated.
- std::string process_type =
- base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kProcessType);
- bool should_use_mojo = process_type == switches::kRendererProcess;
- if (should_use_mojo) {
- std::string token =
- base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kMojoChannelToken);
- channel_ = IPC::ChannelProxy::Create(
- IPC::ChannelMojo::CreateClientFactory(
- mojo::edk::CreateChildMessagePipe(
- base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kMojoChannelToken)),
- io_thread_.task_runner()),
- this, io_thread_.task_runner());
- } else {
- std::string channel_name =
- base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kProcessChannelID);
- channel_ =
- IPC::ChannelProxy::Create(channel_name, IPC::Channel::MODE_CLIENT, this,
- io_thread_.task_runner());
- }
+ channel_ = IPC::ChannelProxy::Create(
+ IPC::ChannelMojo::CreateClientFactory(
+ mojo::edk::CreateChildMessagePipe(
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kMojoChannelToken)),
+ io_thread_.task_runner()),
+ this, io_thread_.task_runner());
}
bool ReplayProcess::OpenTestcase() {
« no previous file with comments | « tools/ipc_fuzzer/fuzzer/fuzzer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698