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

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

Issue 2830843002: [Offline pages] Updates to background scheduling to use BTS (Closed)
Patch Set: Move code from BackgroundOfflinerTask to OfflineBackgroundTask Created 3 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/BackgroundSchedulerProcessor.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/BackgroundSchedulerProcessor.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerProcessor.java
similarity index 59%
rename from chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/BackgroundSchedulerProcessor.java
rename to chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerProcessor.java
index bf8d569946a6572e5f03a4f903993a1a52f53115..be0987fd4e344f532270efacf71199b2ae21347f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/BackgroundSchedulerProcessor.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerProcessor.java
@@ -2,28 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-package org.chromium.chrome.browser.offlinepages.interfaces;
+package org.chromium.chrome.browser.offlinepages;
import org.chromium.base.Callback;
-import org.chromium.chrome.browser.offlinepages.DeviceConditions;
-/**
- * Interface to allow mocking out the BackgroundSchedulerProcessor, which must call static
- * methods in BackgroundSchedulerBridge.
- */
-public interface BackgroundSchedulerProcessor {
+/** Class allowing for mocking out calls to BackgroundSchedulerBridge. */
+public class BackgroundSchedulerProcessor {
/**
* Starts processing of one or more queued background requests. Returns whether processing was
* started and that caller should expect a callback (once processing has completed or
* terminated). If processing was already active or not able to process for some other reason,
* returns false and this calling instance will not receive a callback.
*/
- boolean startScheduledProcessing(DeviceConditions deviceConditions, Callback<Boolean> callback);
+ public boolean startScheduledProcessing(
+ DeviceConditions deviceConditions, Callback<Boolean> callback) {
+ return BackgroundSchedulerBridge.startScheduledProcessing(deviceConditions, callback);
+ }
/**
* Stops processing background requests.
* @return Whether processing should be scheduled again at a later time, because there is more
* work.
*/
- boolean stopScheduledProcessing();
+ public boolean stopScheduledProcessing() {
+ return BackgroundSchedulerBridge.stopScheduledProcessing();
+ }
}

Powered by Google App Engine
This is Rietveld 408576698