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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java

Issue 2376893006: [Downloads] Open media downloads internally (Closed)
Patch Set: Test changes, moving files Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.download; 5 package org.chromium.chrome.browser.download;
6 6
7 import android.content.ComponentName; 7 import android.content.ComponentName;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.content.ServiceConnection; 10 import android.content.ServiceConnection;
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 case DOWNLOAD_NOTIFICATION_TYPE_PAUSE: 273 case DOWNLOAD_NOTIFICATION_TYPE_PAUSE:
274 mBoundService.notifyDownloadPaused(info.getDownloadGuid( ), true, false); 274 mBoundService.notifyDownloadPaused(info.getDownloadGuid( ), true, false);
275 break; 275 break;
276 case DOWNLOAD_NOTIFICATION_TYPE_INTERRUPT: 276 case DOWNLOAD_NOTIFICATION_TYPE_INTERRUPT:
277 mBoundService.notifyDownloadPaused( 277 mBoundService.notifyDownloadPaused(
278 info.getDownloadGuid(), info.isResumable(), 278 info.getDownloadGuid(), info.isResumable(),
279 notificationInfo.isAutoResumable); 279 notificationInfo.isAutoResumable);
280 break; 280 break;
281 case DOWNLOAD_NOTIFICATION_TYPE_SUCCESS: 281 case DOWNLOAD_NOTIFICATION_TYPE_SUCCESS:
282 final int notificationId = mBoundService.notifyDownloadS uccessful( 282 final int notificationId = mBoundService.notifyDownloadS uccessful(
283 info.getDownloadGuid(), info.getFileName(), 283 info.getDownloadGuid(), info.getFilePath(), info .getFileName(),
284 notificationInfo.systemDownloadId, info.isOfflin ePage()); 284 notificationInfo.systemDownloadId, info.isOfflin ePage());
285 onSuccessNotificationShown(notificationInfo, notificatio nId); 285 onSuccessNotificationShown(notificationInfo, notificatio nId);
286 stopServiceIfNeeded(); 286 stopServiceIfNeeded();
287 break; 287 break;
288 case DOWNLOAD_NOTIFICATION_TYPE_FAILURE: 288 case DOWNLOAD_NOTIFICATION_TYPE_FAILURE:
289 mBoundService.notifyDownloadFailed( 289 mBoundService.notifyDownloadFailed(
290 info.getDownloadGuid(), info.getFileName()); 290 info.getDownloadGuid(), info.getFileName());
291 stopServiceIfNeeded(); 291 stopServiceIfNeeded();
292 break; 292 break;
293 case DOWNLOAD_NOTIFICATION_TYPE_CANCEL: 293 case DOWNLOAD_NOTIFICATION_TYPE_CANCEL:
294 mBoundService.notifyDownloadCanceled(info.getDownloadGui d()); 294 mBoundService.notifyDownloadCanceled(info.getDownloadGui d());
295 stopServiceIfNeeded(); 295 stopServiceIfNeeded();
296 break; 296 break;
297 case DOWNLOAD_NOTIFICATION_TYPE_RESUME_ALL: 297 case DOWNLOAD_NOTIFICATION_TYPE_RESUME_ALL:
298 mBoundService.resumeAllPendingDownloads(); 298 mBoundService.resumeAllPendingDownloads();
299 stopServiceIfNeeded(); 299 stopServiceIfNeeded();
300 break; 300 break;
301 default: 301 default:
302 assert false; 302 assert false;
303 } 303 }
304 } 304 }
305 } 305 }
306 } 306 }
307 } 307 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698