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

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

Issue 2729623007: Don't cancel download when dismissing the notification (Closed)
Patch Set: rebase Created 3 years, 9 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.downloads; 5 package org.chromium.chrome.browser.offlinepages.downloads;
6 6
7 import android.content.ComponentName; 7 import android.content.ComponentName;
8 import android.support.annotation.Nullable; 8 import android.support.annotation.Nullable;
9 9
10 import org.chromium.base.ObserverList; 10 import org.chromium.base.ObserverList;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 /** 119 /**
120 * Gets a download item related to the provided GUID. 120 * Gets a download item related to the provided GUID.
121 * @param guid a GUID of the item to get. 121 * @param guid a GUID of the item to get.
122 * @return download item related to the offline page identified by GUID. 122 * @return download item related to the offline page identified by GUID.
123 */ 123 */
124 public OfflinePageDownloadItem getItem(String guid) { 124 public OfflinePageDownloadItem getItem(String guid) {
125 return nativeGetItemByGuid(mNativeOfflinePageDownloadBridge, guid); 125 return nativeGetItemByGuid(mNativeOfflinePageDownloadBridge, guid);
126 } 126 }
127 127
128 @Override 128 @Override
129 public void cancelDownload(String downloadGuid, boolean isOffTheRecord, 129 public void cancelDownload(String downloadGuid, boolean isOffTheRecord) {
130 boolean isNotificationDismissed) {
131 cancelDownload(downloadGuid); 130 cancelDownload(downloadGuid);
132 } 131 }
133 132
134 @Override 133 @Override
135 public void pauseDownload(String downloadGuid, boolean isOffTheRecord) { 134 public void pauseDownload(String downloadGuid, boolean isOffTheRecord) {
136 pauseDownload(downloadGuid); 135 pauseDownload(downloadGuid);
137 } 136 }
138 137
139 @Override 138 @Override
140 public void resumeDownload(DownloadItem item, boolean hasUserGesture) { 139 public void resumeDownload(DownloadItem item, boolean hasUserGesture) {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 native OfflinePageDownloadItem nativeGetItemByGuid( 299 native OfflinePageDownloadItem nativeGetItemByGuid(
301 long nativeOfflinePageDownloadBridge, String guid); 300 long nativeOfflinePageDownloadBridge, String guid);
302 native void nativeCancelDownload(long nativeOfflinePageDownloadBridge, Strin g guid); 301 native void nativeCancelDownload(long nativeOfflinePageDownloadBridge, Strin g guid);
303 native void nativePauseDownload(long nativeOfflinePageDownloadBridge, String guid); 302 native void nativePauseDownload(long nativeOfflinePageDownloadBridge, String guid);
304 native void nativeResumeDownload(long nativeOfflinePageDownloadBridge, Strin g guid); 303 native void nativeResumeDownload(long nativeOfflinePageDownloadBridge, Strin g guid);
305 native void nativeDeleteItemByGuid(long nativeOfflinePageDownloadBridge, Str ing guid); 304 native void nativeDeleteItemByGuid(long nativeOfflinePageDownloadBridge, Str ing guid);
306 native long nativeGetOfflineIdByGuid(long nativeOfflinePageDownloadBridge, S tring guid); 305 native long nativeGetOfflineIdByGuid(long nativeOfflinePageDownloadBridge, S tring guid);
307 native void nativeStartDownload(long nativeOfflinePageDownloadBridge, Tab ta b); 306 native void nativeStartDownload(long nativeOfflinePageDownloadBridge, Tab ta b);
308 native void nativeResumePendingRequestImmediately(long nativeOfflinePageDown loadBridge); 307 native void nativeResumePendingRequestImmediately(long nativeOfflinePageDown loadBridge);
309 } 308 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698