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

Unified Diff: remoting/client/jni/chromoting_jni_runtime.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
« no previous file with comments | « remoting/client/ios/app_runtime.cc ('k') | remoting/host/it2me/it2me_native_messaging_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/jni/chromoting_jni_runtime.cc
diff --git a/remoting/client/jni/chromoting_jni_runtime.cc b/remoting/client/jni/chromoting_jni_runtime.cc
index 1505e441aeba54c9e7dfe49bb957f38b6af6b0dc..231038560c7771096e05e4992a8408a3ac1e0873 100644
--- a/remoting/client/jni/chromoting_jni_runtime.cc
+++ b/remoting/client/jni/chromoting_jni_runtime.cc
@@ -14,6 +14,7 @@
#include "base/memory/singleton.h"
#include "base/stl_util.h"
#include "base/synchronization/waitable_event.h"
+#include "base/task_scheduler/task_scheduler.h"
#include "jni/JniInterface_jni.h"
#include "remoting/base/chromium_url_request.h"
#include "remoting/base/url_request_context_getter.h"
@@ -42,6 +43,9 @@ bool RegisterChromotingJniRuntime(JNIEnv* env) {
static void LoadNative(JNIEnv* env, const JavaParamRef<jclass>& clazz) {
base::CommandLine::Init(0, nullptr);
+ const int kMaxBackgroundThreads = 5;
joedow 2017/02/01 23:20:42 I see that 5 is used consistently in this CL, is t
Sergey Ulanov 2017/02/02 00:14:19 No, there is nothing scientific about this value.
+ base::TaskScheduler::CreateAndSetSimpleTaskScheduler(kMaxBackgroundThreads);
+
// Create the singleton now so that the Chromoting threads will be set up.
remoting::ChromotingJniRuntime::GetInstance();
}
« no previous file with comments | « remoting/client/ios/app_runtime.cc ('k') | remoting/host/it2me/it2me_native_messaging_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698