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

Unified Diff: remoting/host/chromoting_host_context.cc

Issue 10829040: Revert 148418 - Always use chromium threads for IO in remoting host (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/chromoting_host_context.h ('k') | remoting/host/chromoting_host_context_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host_context.cc
===================================================================
--- remoting/host/chromoting_host_context.cc (revision 148577)
+++ remoting/host/chromoting_host_context.cc (working copy)
@@ -9,15 +9,16 @@
#include "base/bind.h"
#include "base/threading/thread.h"
#include "remoting/host/url_request_context.h"
+#include "remoting/jingle_glue/jingle_thread.h"
namespace remoting {
ChromotingHostContext::ChromotingHostContext(
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner)
- : network_thread_("ChromotingNetworkThread"),
- capture_thread_("ChromotingCaptureThread"),
+ : capture_thread_("ChromotingCaptureThread"),
encode_thread_("ChromotingEncodeThread"),
desktop_thread_("ChromotingDesktopThread"),
+ io_thread_("ChromotingIOThread"),
file_thread_("ChromotingFileIOThread"),
ui_task_runner_(ui_task_runner) {
}
@@ -28,20 +29,24 @@
bool ChromotingHostContext::Start() {
// Start all the threads.
bool started = capture_thread_.Start() && encode_thread_.Start() &&
- network_thread_.StartWithOptions(base::Thread::Options(
- MessageLoop::TYPE_IO, 0)) &&
- desktop_thread_.Start() &&
+ jingle_thread_.Start() && desktop_thread_.Start() &&
+ io_thread_.StartWithOptions(
+ base::Thread::Options(MessageLoop::TYPE_IO, 0)) &&
file_thread_.StartWithOptions(
base::Thread::Options(MessageLoop::TYPE_IO, 0));
if (!started)
return false;
url_request_context_getter_ = new URLRequestContextGetter(
- ui_task_runner(), network_task_runner(),
+ ui_task_runner(), io_task_runner(),
static_cast<MessageLoopForIO*>(file_thread_.message_loop()));
return true;
}
+JingleThread* ChromotingHostContext::jingle_thread() {
+ return &jingle_thread_;
+}
+
base::SingleThreadTaskRunner* ChromotingHostContext::capture_task_runner() {
return capture_thread_.message_loop_proxy();
}
@@ -51,7 +56,7 @@
}
base::SingleThreadTaskRunner* ChromotingHostContext::network_task_runner() {
- return network_thread_.message_loop_proxy();
+ return jingle_thread_.message_loop_proxy();
}
base::SingleThreadTaskRunner* ChromotingHostContext::desktop_task_runner() {
@@ -62,6 +67,10 @@
return ui_task_runner_;
}
+base::SingleThreadTaskRunner* ChromotingHostContext::io_task_runner() {
+ return io_thread_.message_loop_proxy();
+}
+
base::SingleThreadTaskRunner* ChromotingHostContext::file_task_runner() {
return file_thread_.message_loop_proxy();
}
« no previous file with comments | « remoting/host/chromoting_host_context.h ('k') | remoting/host/chromoting_host_context_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698