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

Unified Diff: remoting/host/setup/me2me_native_messaging_host_main.cc

Issue 2669893002: Initialize TaskScheduler in remoting processes. (Closed)
Patch Set: Created 3 years, 11 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
Index: remoting/host/setup/me2me_native_messaging_host_main.cc
diff --git a/remoting/host/setup/me2me_native_messaging_host_main.cc b/remoting/host/setup/me2me_native_messaging_host_main.cc
index b7a8140e128a670fadc5f039a2f349f7c4956c11..5ec6da9ac80077a8a1c4444d6da827e408e35218 100644
--- a/remoting/host/setup/me2me_native_messaging_host_main.cc
+++ b/remoting/host/setup/me2me_native_messaging_host_main.cc
@@ -51,7 +51,13 @@ using remoting::protocol::PairingRegistry;
namespace remoting {
-int StartMe2MeNativeMessagingHost() {
+int Me2MeNativeMessagingHostMain(int argc, char** argv) {
+ // This object instance is required by Chrome code (such as MessageLoop).
+ base::AtExitManager exit_manager;
+
+ base::CommandLine::Init(argc, argv);
+ remoting::InitHostLogging();
+
#if defined(OS_MACOSX)
// Needed so we don't leak objects when threads are created.
base::mac::ScopedNSAutoreleasePool pool;
@@ -79,6 +85,9 @@ int StartMe2MeNativeMessagingHost() {
// }
#endif // defined(REMOTING_ENABLE_BREAKPAD)
+ const int kMaxBackgroundThreads = 5;
+ base::TaskScheduler::CreateAndSetSimpleTaskScheduler(kMaxBackgroundThreads);
+
// Mac OS X requires that the main thread be a UI message loop in order to
// receive distributed notifications from the System Preferences pane. An
// IO thread is needed for the pairing registry and URL context getter.
@@ -261,14 +270,4 @@ int StartMe2MeNativeMessagingHost() {
return kSuccessExitCode;
}
-int Me2MeNativeMessagingHostMain(int argc, char** argv) {
- // This object instance is required by Chrome code (such as MessageLoop).
- base::AtExitManager exit_manager;
-
- base::CommandLine::Init(argc, argv);
- remoting::InitHostLogging();
-
- return StartMe2MeNativeMessagingHost();
-}
-
} // namespace remoting
« remoting/client/jni/chromoting_jni_runtime.cc ('K') | « remoting/host/remoting_me2me_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698