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

Side by Side Diff: chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/ShadowGcmNetworkManager.java

Issue 2686203002: [Offline pages] Creating BackgroundJobScheduler, which uses JobScheduler (Closed)
Patch Set: Addressing feedback Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.offlinepages; 5 package org.chromium.chrome.browser.offlinepages;
6 6
7 import com.google.android.gms.gcm.GcmNetworkManager; 7 import com.google.android.gms.gcm.GcmNetworkManager;
8 import com.google.android.gms.gcm.GcmTaskService; 8 import com.google.android.gms.gcm.GcmTaskService;
9 import com.google.android.gms.gcm.Task; 9 import com.google.android.gms.gcm.Task;
10 10
11 import org.robolectric.annotation.Implementation; 11 import org.robolectric.annotation.Implementation;
12 import org.robolectric.annotation.Implements; 12 import org.robolectric.annotation.Implements;
13 13
14
15 /** 14 /**
16 * Custom shadow for the OS's GcmNetworkManager. We use this to hook the call t o GcmNetworkManager 15 * Custom shadow for the OS's GcmNetworkManager. We use this to hook the call t o GcmNetworkManager
17 * to make sure it was invoked as we expect. 16 * to make sure it was invoked as we expect.
18 */ 17 */
19 @Implements(GcmNetworkManager.class) 18 @Implements(GcmNetworkManager.class)
20 public class ShadowGcmNetworkManager { 19 public class ShadowGcmNetworkManager {
21 private Task mTask; 20 private Task mTask;
22 private Task mCanceledTask; 21 private Task mCanceledTask;
23 22
24 @Implementation 23 @Implementation
(...skipping 17 matching lines...) Expand all
42 41
43 public Task getCanceledTask() { 42 public Task getCanceledTask() {
44 return mCanceledTask; 43 return mCanceledTask;
45 } 44 }
46 45
47 public void clear() { 46 public void clear() {
48 mTask = null; 47 mTask = null;
49 mCanceledTask = null; 48 mCanceledTask = null;
50 } 49 }
51 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698