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

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

Issue 1985923002: Wireframe scheduler implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More CR feedback per BauerB 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
Index: chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java
index c3a5ba036967e4cb5a2901ddb3f25df4c6432bc5..aaf8ab98679adbaaa455989eb55112c2c0a3b65b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java
@@ -4,9 +4,9 @@
package org.chromium.chrome.browser.offlinepages;
+import org.chromium.base.ContextUtils;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
-import org.chromium.chrome.browser.profiles.Profile;
/**
* Provides Java scheduling support from native offlining code as
@@ -15,7 +15,6 @@ import org.chromium.chrome.browser.profiles.Profile;
*/
@JNINamespace("offline_pages::android")
public class BackgroundSchedulerBridge {
-
/**
* Callback used to determine when request processing is done.
*/
@@ -32,24 +31,19 @@ public class BackgroundSchedulerBridge {
// not receive a callback.
// TODO(dougarnett): consider adding policy check api to let caller
// separately determine if not allowed by policy.
- public static boolean startProcessing(
- Profile profile, ProcessingDoneCallback callback) {
- return nativeStartProcessing(profile, callback);
+ public static boolean startProcessing(ProcessingDoneCallback callback) {
+ return nativeStartProcessing(callback);
}
@CalledByNative
private static void schedule() {
- // TODO(dougarnett): call GcmNetworkManager to schedule for
- // OfflinePageUtils.TASK_TAG.
+ BackgroundScheduler.schedule(ContextUtils.getApplicationContext());
}
@CalledByNative
private static void unschedule() {
- // TODO(dougarnett): call GcmNetworkManager to unschedule for
- // OfflinePageUtils.TASK_TAG.
+ BackgroundScheduler.unschedule(ContextUtils.getApplicationContext());
}
- private static native boolean nativeStartProcessing(
- Profile profile, ProcessingDoneCallback callback);
+ private static native boolean nativeStartProcessing(ProcessingDoneCallback callback);
}
-

Powered by Google App Engine
This is Rietveld 408576698