summaryrefslogtreecommitdiffstats
path: root/remoting/host/chromoting_host_context.cc
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-02 21:26:39 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-02 21:26:39 +0000
commitb592165f7de822d7bcaa3812ec11a4c4125d845a (patch)
tree20cf34d01683fbae5d0df04fedd1aed5bd9e8eb5 /remoting/host/chromoting_host_context.cc
parent3764dddb64111f17e929e76de2835a63088593b8 (diff)
downloadchromium_src-b592165f7de822d7bcaa3812ec11a4c4125d845a.zip
chromium_src-b592165f7de822d7bcaa3812ec11a4c4125d845a.tar.gz
chromium_src-b592165f7de822d7bcaa3812ec11a4c4125d845a.tar.bz2
Fix ChromotingHost and DesktopEnvironmentFactory references to TaskRunners.
These classes previously referenced TaskRunners indirectly via a supplied ChromotingHostContext, causing them to fail unexpectedly when trying to use the TaskRunners after they had been detached from the ChromotingHostContext during shutdown. This CL has them take their own references to the TaskRunners they need. This CL also renames the "desktop" TaskRunner to "input" TaskRunner, reflecting its current purpose. BUG=145856 Review URL: https://chromiumcodereview.appspot.com/11018004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159771 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/chromoting_host_context.cc')
-rw-r--r--remoting/host/chromoting_host_context.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/remoting/host/chromoting_host_context.cc b/remoting/host/chromoting_host_context.cc
index 87eeb1b..e3511db 100644
--- a/remoting/host/chromoting_host_context.cc
+++ b/remoting/host/chromoting_host_context.cc
@@ -17,9 +17,9 @@ ChromotingHostContext::ChromotingHostContext(
scoped_refptr<AutoThreadTaskRunner> ui_task_runner)
: audio_thread_("ChromotingAudioThread"),
capture_thread_("ChromotingCaptureThread"),
- desktop_thread_("ChromotingDesktopThread"),
encode_thread_("ChromotingEncodeThread"),
file_thread_("ChromotingFileIOThread"),
+ input_thread_("ChromotingInputThread"),
network_thread_("ChromotingNetworkThread"),
ui_task_runner_(ui_task_runner) {
}
@@ -31,9 +31,9 @@ void ChromotingHostContext::ReleaseTaskRunners() {
url_request_context_getter_ = NULL;
audio_task_runner_ = NULL;
capture_task_runner_ = NULL;
- desktop_task_runner_ = NULL;
encode_task_runner_ = NULL;
file_task_runner_ = NULL;
+ input_task_runner_ = NULL;
network_task_runner_ = NULL;
ui_task_runner_ = NULL;
}
@@ -43,9 +43,9 @@ bool ChromotingHostContext::Start() {
base::Thread::Options io_thread_options(MessageLoop::TYPE_IO, 0);
bool started = capture_thread_.Start() && encode_thread_.Start() &&
audio_thread_.StartWithOptions(io_thread_options) &&
- network_thread_.StartWithOptions(io_thread_options) &&
- desktop_thread_.StartWithOptions(io_thread_options) &&
- file_thread_.StartWithOptions(io_thread_options);
+ file_thread_.StartWithOptions(io_thread_options) &&
+ input_thread_.StartWithOptions(io_thread_options) &&
+ network_thread_.StartWithOptions(io_thread_options);
if (!started)
return false;
@@ -58,15 +58,15 @@ bool ChromotingHostContext::Start() {
capture_task_runner_ =
new AutoThreadTaskRunner(capture_thread_.message_loop_proxy(),
ui_task_runner_);
- desktop_task_runner_ =
- new AutoThreadTaskRunner(desktop_thread_.message_loop_proxy(),
- ui_task_runner_);
encode_task_runner_ =
new AutoThreadTaskRunner(encode_thread_.message_loop_proxy(),
ui_task_runner_);
file_task_runner_ =
new AutoThreadTaskRunner(file_thread_.message_loop_proxy(),
ui_task_runner_);
+ input_task_runner_ =
+ new AutoThreadTaskRunner(input_thread_.message_loop_proxy(),
+ ui_task_runner_);
network_task_runner_ =
new AutoThreadTaskRunner(network_thread_.message_loop_proxy(),
ui_task_runner_);
@@ -85,10 +85,6 @@ base::SingleThreadTaskRunner* ChromotingHostContext::capture_task_runner() {
return capture_task_runner_;
}
-base::SingleThreadTaskRunner* ChromotingHostContext::desktop_task_runner() {
- return desktop_task_runner_;
-}
-
base::SingleThreadTaskRunner* ChromotingHostContext::encode_task_runner() {
return encode_task_runner_;
}
@@ -97,6 +93,10 @@ base::SingleThreadTaskRunner* ChromotingHostContext::file_task_runner() {
return file_task_runner_;
}
+base::SingleThreadTaskRunner* ChromotingHostContext::input_task_runner() {
+ return input_task_runner_;
+}
+
base::SingleThreadTaskRunner* ChromotingHostContext::network_task_runner() {
return network_task_runner_;
}