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

Unified Diff: remoting/host/daemon_process.cc

Issue 10837292: [Chromoting] Moving the I/O thread out of DaemonProcess (so it can be shared if needed). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 4 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 | « remoting/host/daemon_process.h ('k') | remoting/host/daemon_process_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/daemon_process.cc
diff --git a/remoting/host/daemon_process.cc b/remoting/host/daemon_process.cc
index d0ccd0cd05656acba7bba44a4415121b7b841cbe..2a08284eb4dae13847613ae9b7a590961b3e75ee 100644
--- a/remoting/host/daemon_process.cc
+++ b/remoting/host/daemon_process.cc
@@ -26,9 +26,11 @@ bool DaemonProcess::OnMessageReceived(const IPC::Message& message) {
DaemonProcess::DaemonProcess(
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
const base::Closure& stopped_callback)
: Stoppable(main_task_runner, stopped_callback),
- main_task_runner_(main_task_runner) {
+ main_task_runner_(main_task_runner),
+ io_task_runner_(io_task_runner) {
// Initialize on the same thread that will be used for shutting down.
main_task_runner_->PostTask(
FROM_HERE,
@@ -38,15 +40,6 @@ DaemonProcess::DaemonProcess(
void DaemonProcess::Init() {
DCHECK(main_task_runner_->BelongsToCurrentThread());
- // Launch the IPC thread.
- ipc_thread_.reset(new base::Thread(kIpcThreadName));
- base::Thread::Options io_thread_options(MessageLoop::TYPE_IO, 0);
- if (!ipc_thread_->StartWithOptions(io_thread_options)) {
- LOG(ERROR) << "Failed to start the Daemon process IPC thread.";
- Stop();
- return;
- }
-
if (!LaunchNetworkProcess()) {
LOG(ERROR) << "Failed to launch the networking process.";
Stop();
@@ -57,10 +50,6 @@ void DaemonProcess::Init() {
void DaemonProcess::DoStop() {
DCHECK(main_task_runner_->BelongsToCurrentThread());
- if (ipc_thread_.get()) {
- ipc_thread_->Stop();
- }
-
CompleteStopping();
}
« no previous file with comments | « remoting/host/daemon_process.h ('k') | remoting/host/daemon_process_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698