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

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

Issue 2060353003: Adds implementation of BackgroundScheduler.unschedule() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revises schedule time validation to just be sure positive value is set for now Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPacker.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 android.content.Context; 7 import android.content.Context;
8 import android.os.Bundle; 8 import android.os.Bundle;
9 9
10 import com.google.android.gms.gcm.GcmNetworkManager; 10 import com.google.android.gms.gcm.GcmNetworkManager;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 .setExtras(taskExtras) 42 .setExtras(taskExtras)
43 .build(); 43 .build();
44 44
45 gcmNetworkManager.schedule(task); 45 gcmNetworkManager.schedule(task);
46 } 46 }
47 47
48 /** 48 /**
49 * Cancel any outstanding GCM Network Manager requests. 49 * Cancel any outstanding GCM Network Manager requests.
50 */ 50 */
51 public static void unschedule(Context context) { 51 public static void unschedule(Context context) {
52 // TODO(petewil): Take our task off the task queue. 52 // Get the GCM Network Scheduler.
53 GcmNetworkManager gcmNetworkManager = GcmNetworkManager.getInstance(cont ext);
54 gcmNetworkManager.cancelTask(OfflinePageUtils.TASK_TAG, ChromeBackground Service.class);
53 } 55 }
54 } 56 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPacker.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698