summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorerikchen <erikchen@chromium.org>2015-09-23 20:26:38 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-24 03:28:27 +0000
commit30dc2811d9c106d733cea51f5600875cacba2f80 (patch)
treeb867453e48f95aed038868096f4b57b755acc7a7 /remoting
parent3a2ac1dd9e42e314c77300864c108ea8be51aadd (diff)
downloadchromium_src-30dc2811d9c106d733cea51f5600875cacba2f80.zip
chromium_src-30dc2811d9c106d733cea51f5600875cacba2f80.tar.gz
chromium_src-30dc2811d9c106d733cea51f5600875cacba2f80.tar.bz2
ipc: Remove unnecessary attachment broker plumbing.
The original design was to pass around an instance of an attachment broker. The new design uses a single global, and no longer needs any plumbing. This CL removes the last vestiges of the plumbing. BUG=493414 Review URL: https://codereview.chromium.org/1354973006 Cr-Commit-Position: refs/heads/master@{#350471}
Diffstat (limited to 'remoting')
-rw-r--r--remoting/host/desktop_process.cc8
-rw-r--r--remoting/host/desktop_process_unittest.cc16
-rw-r--r--remoting/host/desktop_session_proxy.cc6
-rw-r--r--remoting/host/ipc_desktop_environment_unittest.cc9
-rw-r--r--remoting/host/ipc_util_posix.cc6
-rw-r--r--remoting/host/ipc_util_win.cc3
-rw-r--r--remoting/host/remoting_me2me_host.cc10
-rw-r--r--remoting/host/win/worker_process_launcher_unittest.cc5
-rw-r--r--remoting/host/win/wts_session_process_delegate.cc3
9 files changed, 23 insertions, 43 deletions
diff --git a/remoting/host/desktop_process.cc b/remoting/host/desktop_process.cc
index 72e0d35..44fb8da 100644
--- a/remoting/host/desktop_process.cc
+++ b/remoting/host/desktop_process.cc
@@ -139,11 +139,9 @@ bool DesktopProcess::Start(
}
// Connect to the daemon.
- daemon_channel_ = IPC::ChannelProxy::Create(daemon_channel_name_,
- IPC::Channel::MODE_CLIENT,
- this,
- io_task_runner.get(),
- nullptr);
+ daemon_channel_ =
+ IPC::ChannelProxy::Create(daemon_channel_name_, IPC::Channel::MODE_CLIENT,
+ this, io_task_runner.get());
// Pass |desktop_pipe| to the daemon.
daemon_channel_->Send(
diff --git a/remoting/host/desktop_process_unittest.cc b/remoting/host/desktop_process_unittest.cc
index bac34c6..a10ffcd 100644
--- a/remoting/host/desktop_process_unittest.cc
+++ b/remoting/host/desktop_process_unittest.cc
@@ -175,11 +175,9 @@ void DesktopProcessTest::ConnectNetworkChannel(
IPC::ChannelHandle channel_handle(desktop_process);
#endif // defined(OS_WIN)
- network_channel_ = IPC::ChannelProxy::Create(channel_handle,
- IPC::Channel::MODE_CLIENT,
- &network_listener_,
- io_task_runner_.get(),
- nullptr);
+ network_channel_ =
+ IPC::ChannelProxy::Create(channel_handle, IPC::Channel::MODE_CLIENT,
+ &network_listener_, io_task_runner_.get());
}
void DesktopProcessTest::OnDesktopAttached(
@@ -247,11 +245,9 @@ void DesktopProcessTest::RunDesktopProcess() {
"IPC thread", ui_task_runner, base::MessageLoop::TYPE_IO);
std::string channel_name = IPC::Channel::GenerateUniqueRandomChannelID();
- daemon_channel_ = IPC::ChannelProxy::Create(IPC::ChannelHandle(channel_name),
- IPC::Channel::MODE_SERVER,
- &daemon_listener_,
- io_task_runner_.get(),
- nullptr);
+ daemon_channel_ = IPC::ChannelProxy::Create(
+ IPC::ChannelHandle(channel_name), IPC::Channel::MODE_SERVER,
+ &daemon_listener_, io_task_runner_.get());
scoped_ptr<MockDesktopEnvironmentFactory> desktop_environment_factory(
new MockDesktopEnvironmentFactory());
diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc
index 54399d9..ba098f6 100644
--- a/remoting/host/desktop_session_proxy.cc
+++ b/remoting/host/desktop_session_proxy.cc
@@ -265,10 +265,8 @@ bool DesktopSessionProxy::AttachToDesktop(
// Connect to the desktop process.
desktop_channel_ = IPC::ChannelProxy::Create(desktop_channel_handle,
- IPC::Channel::MODE_CLIENT,
- this,
- io_task_runner_.get(),
- nullptr);
+ IPC::Channel::MODE_CLIENT, this,
+ io_task_runner_.get());
// Pass ID of the client (which is authenticated at this point) to the desktop
// session agent and start the agent.
diff --git a/remoting/host/ipc_desktop_environment_unittest.cc b/remoting/host/ipc_desktop_environment_unittest.cc
index b8c3910..9bfb621 100644
--- a/remoting/host/ipc_desktop_environment_unittest.cc
+++ b/remoting/host/ipc_desktop_environment_unittest.cc
@@ -394,12 +394,9 @@ void IpcDesktopEnvironmentTest::CreateDesktopProcess() {
// Create the daemon end of the daemon-to-desktop channel.
desktop_channel_name_ = IPC::Channel::GenerateUniqueRandomChannelID();
- desktop_channel_ =
- IPC::ChannelProxy::Create(IPC::ChannelHandle(desktop_channel_name_),
- IPC::Channel::MODE_SERVER,
- &desktop_listener_,
- io_task_runner_.get(),
- nullptr);
+ desktop_channel_ = IPC::ChannelProxy::Create(
+ IPC::ChannelHandle(desktop_channel_name_), IPC::Channel::MODE_SERVER,
+ &desktop_listener_, io_task_runner_.get());
// Create and start the desktop process.
desktop_process_.reset(new DesktopProcess(task_runner_,
diff --git a/remoting/host/ipc_util_posix.cc b/remoting/host/ipc_util_posix.cc
index 4c7010b..b7c5277 100644
--- a/remoting/host/ipc_util_posix.cc
+++ b/remoting/host/ipc_util_posix.cc
@@ -47,10 +47,8 @@ bool CreateConnectedIpcChannel(
base::FileDescriptor fd(pipe_fds[0], false);
IPC::ChannelHandle handle(socket_name, fd);
*server_out = IPC::ChannelProxy::Create(IPC::ChannelHandle(socket_name, fd),
- IPC::Channel::MODE_SERVER,
- listener,
- io_task_runner.get(),
- nullptr);
+ IPC::Channel::MODE_SERVER, listener,
+ io_task_runner.get());
*client_out = base::File(pipe_fds[1]);
return true;
diff --git a/remoting/host/ipc_util_win.cc b/remoting/host/ipc_util_win.cc
index f470210..22ac15a 100644
--- a/remoting/host/ipc_util_win.cc
+++ b/remoting/host/ipc_util_win.cc
@@ -58,8 +58,7 @@ bool CreateConnectedIpcChannel(
IPC::ChannelProxy::Create(IPC::ChannelHandle(pipe.Get()),
IPC::Channel::MODE_SERVER,
listener,
- io_task_runner,
- nullptr);
+ io_task_runner);
// Convert the channel name to the pipe name.
std::string pipe_name(kChromePipeNamePrefix);
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index 6e9dcb7..88fed82 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -469,19 +469,15 @@ bool HostProcess::InitWithCommandLine(const base::CommandLine* cmd_line) {
daemon_channel_ = IPC::ChannelProxy::Create(channel_handle,
IPC::Channel::MODE_CLIENT,
this,
- context_->network_task_runner(),
- nullptr);
+ context_->network_task_runner());
#else // !defined(REMOTING_MULTI_PROCESS)
// Connect to the daemon process.
std::string channel_name =
cmd_line->GetSwitchValueASCII(kDaemonPipeSwitchName);
if (!channel_name.empty()) {
daemon_channel_ =
- IPC::ChannelProxy::Create(channel_name,
- IPC::Channel::MODE_CLIENT,
- this,
- context_->network_task_runner().get(),
- nullptr);
+ IPC::ChannelProxy::Create(channel_name, IPC::Channel::MODE_CLIENT, this,
+ context_->network_task_runner().get());
}
if (cmd_line->HasSwitch(kHostConfigSwitchName)) {
diff --git a/remoting/host/win/worker_process_launcher_unittest.cc b/remoting/host/win/worker_process_launcher_unittest.cc
index de38a00..33dfb55 100644
--- a/remoting/host/win/worker_process_launcher_unittest.cc
+++ b/remoting/host/win/worker_process_launcher_unittest.cc
@@ -277,8 +277,7 @@ void WorkerProcessLauncherTest::ConnectClient() {
channel_client_ = IPC::ChannelProxy::Create(IPC::ChannelHandle(channel_name_),
IPC::Channel::MODE_CLIENT,
&client_listener_,
- task_runner_,
- nullptr);
+ task_runner_);
// Pretend that |kLaunchSuccessTimeoutSeconds| passed since launching
// the worker process. This will make the backoff algorithm think that this
@@ -365,7 +364,7 @@ void WorkerProcessLauncherTest::DoLaunchProcess() {
// Wrap the pipe into an IPC channel.
channel_server_ = IPC::ChannelProxy::Create(
IPC::ChannelHandle(pipe.Get()), IPC::Channel::MODE_SERVER, this,
- task_runner_, nullptr);
+ task_runner_);
HANDLE temp_handle;
ASSERT_TRUE(DuplicateHandle(GetCurrentProcess(),
diff --git a/remoting/host/win/wts_session_process_delegate.cc b/remoting/host/win/wts_session_process_delegate.cc
index 0cd0e87..5895f1f 100644
--- a/remoting/host/win/wts_session_process_delegate.cc
+++ b/remoting/host/win/wts_session_process_delegate.cc
@@ -384,8 +384,7 @@ void WtsSessionProcessDelegate::Core::DoLaunchProcess() {
IPC::ChannelProxy::Create(IPC::ChannelHandle(pipe.Get()),
IPC::Channel::MODE_SERVER,
this,
- io_task_runner_,
- nullptr));
+ io_task_runner_));
// Pass the name of the IPC channel to use.
command_line.AppendSwitchNative(kDaemonPipeSwitchName,