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

Unified Diff: chrome/browser/android/warmup_manager.cc

Issue 2929113002: Enable spare RenderProcessHost to be preinitialized. (Closed)
Patch Set: Change creation of storage partition to not break unittests with subtle threading issues Created 3 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 | « chrome/browser/android/chrome_feature_list.cc ('k') | chrome/browser/flag_descriptions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/warmup_manager.cc
diff --git a/chrome/browser/android/warmup_manager.cc b/chrome/browser/android/warmup_manager.cc
index e3271e3c6960d5064aeba43804e7a0adbe059ee0..eb06a2ed03d57ebec90e45d736b2596093be7f02 100644
--- a/chrome/browser/android/warmup_manager.cc
+++ b/chrome/browser/android/warmup_manager.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/net/predictor.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_android.h"
+#include "content/public/browser/render_process_host.h"
#include "jni/WarmupManager_jni.h"
#include "url/gurl.h"
@@ -27,6 +28,14 @@ static void PreconnectUrlAndSubresources(JNIEnv* env,
}
}
+static void WarmupSpareRenderer(JNIEnv* env,
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jobject>& jprofile) {
+ Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile);
+ if (profile) {
+ content::RenderProcessHost::WarmupSpareRenderProcessHost(profile);
+ }
+}
// Register native methods.
bool RegisterWarmupManager(JNIEnv* env) {
« no previous file with comments | « chrome/browser/android/chrome_feature_list.cc ('k') | chrome/browser/flag_descriptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698