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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundScheduler.java

Issue 2662103003: Always get device conditions from Java for every attempt. (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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java » ('j') | 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/offlinepages/BackgroundScheduler.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundScheduler.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundScheduler.java
index 67d3d5534c5970f47057f1b21c0219968780d926..28e96617a52b2cf40ab1f2454e20e75a424b0e47 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundScheduler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundScheduler.java
@@ -76,4 +76,25 @@ public class BackgroundScheduler {
gcmNetworkManager.schedule(task);
}
+
+ /**
+ * Get the latest power conditions from the android APIs.
+ */
+ public static boolean getPowerConditions(Context context) {
+ return OfflinePageUtils.getPowerConditions(context);
+ }
+
+ /**
+ * Get the latest battery conditions from the android APIs.
+ */
+ public static int getBatteryConditions(Context context) {
+ return OfflinePageUtils.getBatteryConditions(context);
+ }
+
+ /**
+ * Get the latest network conditions from the android APIs.
+ */
+ public static int getNetworkConditions(Context context) {
+ return OfflinePageUtils.getNetworkConditions(context);
+ }
}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698