| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 package org.chromium.chrome.browser.offlinepages.interfaces; | |
| 6 | |
| 7 import org.chromium.base.Callback; | |
| 8 import org.chromium.chrome.browser.offlinepages.DeviceConditions; | |
| 9 | |
| 10 /** | |
| 11 * Interface to allow mocking out the BackgroundSchedulerProcessor, which must c
all static | |
| 12 * methods in BackgroundSchedulerBridge. | |
| 13 */ | |
| 14 public interface BackgroundSchedulerProcessor { | |
| 15 /** | |
| 16 * Starts processing of one or more queued background requests. Returns whe
ther processing was | |
| 17 * started and that caller should expect a callback (once processing has com
pleted or | |
| 18 * terminated). If processing was already active or not able to process for
some other reason, | |
| 19 * returns false and this calling instance will not receive a callback. | |
| 20 */ | |
| 21 boolean startScheduledProcessing(DeviceConditions deviceConditions, Callback
<Boolean> callback); | |
| 22 | |
| 23 /** | |
| 24 * Stops processing background requests. | |
| 25 * @return Whether processing should be scheduled again at a later time, bec
ause there is more | |
| 26 * work. | |
| 27 */ | |
| 28 boolean stopScheduledProcessing(); | |
| 29 } | |
| OLD | NEW |