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

Unified Diff: remoting/host/chromoting_host_context.cc

Issue 10808094: 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
diff --git a/remoting/host/chromoting_host_context.cc b/remoting/host/chromoting_host_context.cc
index 6c251fae85cc36b44361f927fa26e08ac0215150..480de732922a9282de5dac6a984b884150f6f2ec 100644
--- a/remoting/host/chromoting_host_context.cc
+++ b/remoting/host/chromoting_host_context.cc
@@ -9,16 +9,15 @@
#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)
- : capture_thread_("ChromotingCaptureThread"),
+ : network_thread_("ChromotingNetworkThread"),
+ capture_thread_("ChromotingCaptureThread"),
encode_thread_("ChromotingEncodeThread"),
desktop_thread_("ChromotingDesktopThread"),
- io_thread_("ChromotingIOThread"),
file_thread_("ChromotingFileIOThread"),
ui_task_runner_(ui_task_runner) {
}
@@ -29,24 +28,20 @@ ChromotingHostContext::~ChromotingHostContext() {
bool ChromotingHostContext::Start() {
// Start all the threads.
bool started = capture_thread_.Start() && encode_thread_.Start() &&
- jingle_thread_.Start() && desktop_thread_.Start() &&
- io_thread_.StartWithOptions(
- base::Thread::Options(MessageLoop::TYPE_IO, 0)) &&
+ network_thread_.StartWithOptions(base::Thread::Options(
+ MessageLoop::TYPE_IO, 0)) &&
+ desktop_thread_.Start() &&
file_thread_.StartWithOptions(
base::Thread::Options(MessageLoop::TYPE_IO, 0));
if (!started)
return false;
url_request_context_getter_ = new URLRequestContextGetter(
- ui_task_runner(), io_task_runner(),
+ ui_task_runner(), network_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();
}
@@ -56,7 +51,7 @@ base::SingleThreadTaskRunner* ChromotingHostContext::encode_task_runner() {
}
base::SingleThreadTaskRunner* ChromotingHostContext::network_task_runner() {
- return jingle_thread_.message_loop_proxy();
+ return network_thread_.message_loop_proxy();
}
base::SingleThreadTaskRunner* ChromotingHostContext::desktop_task_runner() {
@@ -67,10 +62,6 @@ base::SingleThreadTaskRunner* ChromotingHostContext::ui_task_runner() {
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