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

Unified Diff: remoting/host/chromoting_host_context.cc

Issue 9956148: Add file thread in MessageHostContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 783834f4465eea25fbe2264aaef518b2258daffc..74d214c88ffcf490c8dcc70645889d25aa18cef8 100644
--- a/remoting/host/chromoting_host_context.cc
+++ b/remoting/host/chromoting_host_context.cc
@@ -13,12 +13,11 @@
namespace remoting {
ChromotingHostContext::ChromotingHostContext(
- base::MessageLoopProxy* io_message_loop,
base::MessageLoopProxy* ui_message_loop)
: main_thread_("ChromotingMainThread"),
encode_thread_("ChromotingEncodeThread"),
desktop_thread_("ChromotingDesktopThread"),
- io_message_loop_(io_message_loop),
+ file_thread_("ChromotingFileIOThread"),
ui_message_loop_(ui_message_loop) {
}
@@ -28,21 +27,15 @@ ChromotingHostContext::~ChromotingHostContext() {
bool ChromotingHostContext::Start() {
// Start all the threads.
return main_thread_.Start() && encode_thread_.Start() &&
- jingle_thread_.Start() && desktop_thread_.Start();
+ jingle_thread_.Start() && desktop_thread_.Start() &&
+ file_thread_.StartWithOptions(
+ base::Thread::Options(MessageLoop::TYPE_IO, 0));
}
JingleThread* ChromotingHostContext::jingle_thread() {
return &jingle_thread_;
}
-base::MessageLoopProxy* ChromotingHostContext::io_message_loop() {
- return io_message_loop_;
-}
-
-base::MessageLoopProxy* ChromotingHostContext::ui_message_loop() {
- return ui_message_loop_;
-}
-
MessageLoop* ChromotingHostContext::main_message_loop() {
return main_thread_.message_loop();
}
@@ -59,4 +52,12 @@ MessageLoop* ChromotingHostContext::desktop_message_loop() {
return desktop_thread_.message_loop();
}
+base::MessageLoopProxy* ChromotingHostContext::ui_message_loop() {
+ return ui_message_loop_;
+}
+
+MessageLoop* ChromotingHostContext::file_message_loop() {
+ return file_thread_.message_loop();
+}
+
} // namespace remoting
« 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