Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java |
| index 4b988402734e78d1f374a5675d9af4ce131110a1..499bbd23150b7cd9c0e87b2121456c91a05f522f 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java |
| @@ -21,6 +21,7 @@ import org.chromium.chrome.browser.ntp.snippets.SnippetsBridge; |
| import org.chromium.chrome.browser.ntp.snippets.SnippetsLauncher; |
| import org.chromium.chrome.browser.offlinepages.BackgroundOfflinerTask; |
| import org.chromium.chrome.browser.offlinepages.OfflinePageUtils; |
| +import org.chromium.chrome.browser.offlinepages.SchedulerBridge; |
| import org.chromium.chrome.browser.precache.PrecacheController; |
| /** |
| @@ -125,13 +126,15 @@ public class ChromeBackgroundService extends GcmTaskService { |
| PrecacheController.get(context).precache(tag); |
| } |
| + @VisibleForTesting |
|
dougarnett
2016/06/02 00:14:45
? but the following method is private so confused
Pete Williamson
2016/06/02 00:42:06
I meant to mark it as testable since the test now
|
| private void handleOfflinePageBackgroundLoad(Context context, Bundle bundle) { |
| if (!hasPrecacheInstance()) { |
| launchBrowser(context); |
| } |
| // Call BackgroundTask, provide context. |
| - BackgroundOfflinerTask.startBackgroundRequests(context, bundle); |
| + BackgroundOfflinerTask task = new BackgroundOfflinerTask(new SchedulerBridge()); |
| + task.startBackgroundRequests(context, bundle); |
| // TODO(petewil) if processBackgroundRequest returns false, return RESTART_RESCHEDULE |
| // to the GcmNetworkManager |
| } |