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

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

Issue 2726423002: Fix DownloadNotificationService foreground state (Closed)
Patch Set: Added code to address race conditions for cancel 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 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 case DOWNLOAD_NOTIFICATION_TYPE_CANCEL: 292 case DOWNLOAD_NOTIFICATION_TYPE_CANCEL:
293 mBoundService.notifyDownloadCanceled(info.getDownloadGuid()); 293 mBoundService.notifyDownloadCanceled(info.getDownloadGuid());
294 break; 294 break;
295 case DOWNLOAD_NOTIFICATION_TYPE_RESUME_ALL: 295 case DOWNLOAD_NOTIFICATION_TYPE_RESUME_ALL:
296 mBoundService.resumeAllPendingDownloads(); 296 mBoundService.resumeAllPendingDownloads();
297 break; 297 break;
298 default: 298 default:
299 assert false; 299 assert false;
300 } 300 }
301 301
302 if (mBoundService != null) mBoundService.hideSummaryNotificationIfNecess ary(); 302 // Don't need to expose the notification id to ignore. Cancel will auto matically call this
303 // method as well and pass it in.
304 if (mBoundService != null) mBoundService.hideSummaryNotificationIfNecess ary(null);
303 if (autoRelease) unbindServiceIfNeeded(); 305 if (autoRelease) unbindServiceIfNeeded();
304 } 306 }
305 } 307 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698