diff options
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/host/desktop_process.cc | 4 | ||||
-rw-r--r-- | remoting/host/desktop_process_unittest.cc | 8 | ||||
-rw-r--r-- | remoting/host/desktop_session_proxy.cc | 4 | ||||
-rw-r--r-- | remoting/host/ipc_desktop_environment_unittest.cc | 10 | ||||
-rw-r--r-- | remoting/host/ipc_util_posix.cc | 4 | ||||
-rw-r--r-- | remoting/host/ipc_util_win.cc | 10 | ||||
-rw-r--r-- | remoting/host/remoting_me2me_host.cc | 19 | ||||
-rw-r--r-- | remoting/host/win/worker_process_launcher_unittest.cc | 16 | ||||
-rw-r--r-- | remoting/host/win/wts_session_process_delegate.cc | 10 |
9 files changed, 40 insertions, 45 deletions
diff --git a/remoting/host/desktop_process.cc b/remoting/host/desktop_process.cc index 4592bfd..5f0303e 100644 --- a/remoting/host/desktop_process.cc +++ b/remoting/host/desktop_process.cc @@ -139,10 +139,10 @@ bool DesktopProcess::Start( } // Connect to the daemon. - daemon_channel_.reset(new IPC::ChannelProxy(daemon_channel_name_, + daemon_channel_ = IPC::ChannelProxy::Create(daemon_channel_name_, IPC::Channel::MODE_CLIENT, this, - io_task_runner.get())); + 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 3f5f109..19e5b56 100644 --- a/remoting/host/desktop_process_unittest.cc +++ b/remoting/host/desktop_process_unittest.cc @@ -175,10 +175,10 @@ void DesktopProcessTest::ConnectNetworkChannel( IPC::ChannelHandle channel_handle(desktop_process); #endif // defined(OS_WIN) - network_channel_.reset(new IPC::ChannelProxy(channel_handle, + network_channel_ = IPC::ChannelProxy::Create(channel_handle, IPC::Channel::MODE_CLIENT, &network_listener_, - io_task_runner_.get())); + io_task_runner_.get()); } void DesktopProcessTest::OnDesktopAttached( @@ -246,10 +246,10 @@ void DesktopProcessTest::RunDesktopProcess() { "IPC thread", ui_task_runner, base::MessageLoop::TYPE_IO); std::string channel_name = IPC::Channel::GenerateUniqueRandomChannelID(); - daemon_channel_.reset(new IPC::ChannelProxy(IPC::ChannelHandle(channel_name), + daemon_channel_ = IPC::ChannelProxy::Create(IPC::ChannelHandle(channel_name), IPC::Channel::MODE_SERVER, &daemon_listener_, - io_task_runner_.get())); + 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 28f8296..7904a2d 100644 --- a/remoting/host/desktop_session_proxy.cc +++ b/remoting/host/desktop_session_proxy.cc @@ -253,10 +253,10 @@ bool DesktopSessionProxy::AttachToDesktop( #endif // Connect to the desktop process. - desktop_channel_.reset(new IPC::ChannelProxy(desktop_channel_handle, + desktop_channel_ = IPC::ChannelProxy::Create(desktop_channel_handle, IPC::Channel::MODE_CLIENT, this, - io_task_runner_.get())); + 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 7e31688..c51f063 100644 --- a/remoting/host/ipc_desktop_environment_unittest.cc +++ b/remoting/host/ipc_desktop_environment_unittest.cc @@ -367,11 +367,11 @@ void IpcDesktopEnvironmentTest::CreateDesktopProcess() { // Create the daemon end of the daemon-to-desktop channel. desktop_channel_name_ = IPC::Channel::GenerateUniqueRandomChannelID(); - desktop_channel_.reset( - new IPC::ChannelProxy(IPC::ChannelHandle(desktop_channel_name_), - IPC::Channel::MODE_SERVER, - &desktop_listener_, - io_task_runner_.get())); + 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 4901c99..b0cee30 100644 --- a/remoting/host/ipc_util_posix.cc +++ b/remoting/host/ipc_util_posix.cc @@ -46,10 +46,10 @@ bool CreateConnectedIpcChannel( // Wrap the pipe into an IPC channel. base::FileDescriptor fd(pipe_fds[0], false); IPC::ChannelHandle handle(socket_name, fd); - server_out->reset(new IPC::ChannelProxy(IPC::ChannelHandle(socket_name, fd), + *server_out = IPC::ChannelProxy::Create(IPC::ChannelHandle(socket_name, fd), IPC::Channel::MODE_SERVER, listener, - io_task_runner.get())); + 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 dabdbe1..a1cdbb2 100644 --- a/remoting/host/ipc_util_win.cc +++ b/remoting/host/ipc_util_win.cc @@ -52,11 +52,11 @@ bool CreateConnectedIpcChannel( } // Wrap the pipe into an IPC channel. - scoped_ptr<IPC::ChannelProxy> server(new IPC::ChannelProxy( - IPC::ChannelHandle(pipe), - IPC::Channel::MODE_SERVER, - listener, - io_task_runner)); + scoped_ptr<IPC::ChannelProxy> server = + IPC::ChannelProxy::Create(IPC::ChannelHandle(pipe), + IPC::Channel::MODE_SERVER, + listener, + 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 22f5da0..681dca7 100644 --- a/remoting/host/remoting_me2me_host.cc +++ b/remoting/host/remoting_me2me_host.cc @@ -384,21 +384,20 @@ bool HostProcess::InitWithCommandLine(const base::CommandLine* cmd_line) { #endif // defined(OS_POSIX) // Connect to the daemon process. - daemon_channel_.reset(new IPC::ChannelProxy( - channel_handle, - IPC::Channel::MODE_CLIENT, - this, - context_->network_task_runner())); + daemon_channel_ = IPC::ChannelProxy::Create(channel_handle, + IPC::Channel::MODE_CLIENT, + this, + 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_.reset( - new IPC::ChannelProxy(channel_name, - IPC::Channel::MODE_CLIENT, - this, - context_->network_task_runner().get())); + daemon_channel_ = + 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 5503ab9..917aeb6 100644 --- a/remoting/host/win/worker_process_launcher_unittest.cc +++ b/remoting/host/win/worker_process_launcher_unittest.cc @@ -273,11 +273,10 @@ void WorkerProcessLauncherTest::TerminateWorker(DWORD exit_code) { } void WorkerProcessLauncherTest::ConnectClient() { - channel_client_.reset(new IPC::ChannelProxy( - IPC::ChannelHandle(channel_name_), - IPC::Channel::MODE_CLIENT, - &client_listener_, - task_runner_)); + channel_client_ = IPC::ChannelProxy::Create(IPC::ChannelHandle(channel_name_), + IPC::Channel::MODE_CLIENT, + &client_listener_, + task_runner_); // Pretend that |kLaunchSuccessTimeoutSeconds| passed since launching // the worker process. This will make the backoff algorithm think that this @@ -361,11 +360,8 @@ void WorkerProcessLauncherTest::DoLaunchProcess() { ASSERT_TRUE(CreateIpcChannel(channel_name_, kIpcSecurityDescriptor, &pipe)); // Wrap the pipe into an IPC channel. - channel_server_.reset(new IPC::ChannelProxy( - IPC::ChannelHandle(pipe), - IPC::Channel::MODE_SERVER, - this, - task_runner_)); + channel_server_ = IPC::ChannelProxy::Create( + IPC::ChannelHandle(pipe), IPC::Channel::MODE_SERVER, this, 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 f939abf..eb310df 100644 --- a/remoting/host/win/wts_session_process_delegate.cc +++ b/remoting/host/win/wts_session_process_delegate.cc @@ -379,11 +379,11 @@ void WtsSessionProcessDelegate::Core::DoLaunchProcess() { } // Wrap the pipe into an IPC channel. - scoped_ptr<IPC::ChannelProxy> channel(new IPC::ChannelProxy( - IPC::ChannelHandle(pipe), - IPC::Channel::MODE_SERVER, - this, - io_task_runner_)); + scoped_ptr<IPC::ChannelProxy> channel( + IPC::ChannelProxy::Create(IPC::ChannelHandle(pipe), + IPC::Channel::MODE_SERVER, + this, + io_task_runner_)); // Pass the name of the IPC channel to use. command_line.AppendSwitchNative(kDaemonPipeSwitchName, |