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

Unified Diff: chrome/browser/predictors/resource_prefetch_predictor_android.cc

Issue 2498983005: predictors: Expose the initialization call to Android. (Closed)
Patch Set: Address comments. Created 4 years, 1 month 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/predictors/resource_prefetch_predictor.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/predictors/resource_prefetch_predictor_android.cc
diff --git a/chrome/browser/predictors/resource_prefetch_predictor_android.cc b/chrome/browser/predictors/resource_prefetch_predictor_android.cc
index 15c8a5551a0ff465b2241df913e342690bbdcec9..f1d5f6bb30254b38c0878bc8b94e220c2a9e1ce5 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor_android.cc
+++ b/chrome/browser/predictors/resource_prefetch_predictor_android.cc
@@ -29,6 +29,16 @@ ResourcePrefetchPredictor* ResourcePrefetchPredictorFromProfileAndroid(
} // namespace
+static jboolean StartInitialization(JNIEnv* env,
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jobject>& j_profile) {
+ auto predictor = ResourcePrefetchPredictorFromProfileAndroid(j_profile);
+ if (!predictor)
+ return false;
+ predictor->StartInitialization();
+ return true;
+}
+
static jboolean StartPrefetching(JNIEnv* env,
const JavaParamRef<jclass>& clazz,
const JavaParamRef<jobject>& j_profile,
« no previous file with comments | « chrome/browser/predictors/resource_prefetch_predictor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698