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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/precache/PrecacheLauncher.java

Issue 2037913002: Do not cancel precache periodic GCM task if current network is non-WiFi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/precache/PrecacheLauncher.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/precache/PrecacheLauncher.java b/chrome/android/java/src/org/chromium/chrome/browser/precache/PrecacheLauncher.java
index 915eb58b7ab06edaf7d2aff6e7a99b191e202122..d9c8f252fb3bbf40f10bf5c0537febc5caf3dfbd 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/precache/PrecacheLauncher.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/precache/PrecacheLauncher.java
@@ -101,7 +101,6 @@ public abstract class PrecacheLauncher {
*
* <ul>
* <li>The predictive network actions preference is enabled.</li>
- * <li>The current network type is suitable for predictive network actions.</li>
* <li>Sync is enabled for sessions and it is not encrypted with a secondary passphrase.</li>
* <li>Either the Precache field trial or the precache commandline flag is enabled.</li>
* </ul>
@@ -116,15 +115,15 @@ public abstract class PrecacheLauncher {
// thread.
ThreadUtils.assertOnUiThread();
- boolean networkPredictionsAllowed =
- PrefServiceBridge.getInstance().canPrefetchAndPrerender();
+ boolean networkPredictionEnabledPref =
+ PrefServiceBridge.getInstance().getNetworkPredictionEnabled();
boolean shouldRun = nativeShouldRun();
- mNetworkPredictionsAllowed = networkPredictionsAllowed;
+ mNetworkPredictionsAllowed = networkPredictionEnabledPref;
mShouldRun = shouldRun;
PrecacheController.setIsPrecachingEnabled(
- context, networkPredictionsAllowed && shouldRun);
+ context, networkPredictionEnabledPref && shouldRun);
Log.v(TAG, "updateEnabledSync complete");
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698