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

Unified Diff: chrome/browser/ui/cocoa/download/download_item_mac.mm

Issue 966983002: downloads: clicking "remove" on chrome://downloads should also hide shelf item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: slimmer Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/download/download_item_mac.mm
diff --git a/chrome/browser/ui/cocoa/download/download_item_mac.mm b/chrome/browser/ui/cocoa/download/download_item_mac.mm
index bf1ebc91e9e431fd4994cc5b5807438dd212131b..9ad3bfd57c0d69707523a2d00273687f9c186302 100644
--- a/chrome/browser/ui/cocoa/download/download_item_mac.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_mac.mm
@@ -42,6 +42,11 @@ void DownloadItemMac::OnDownloadUpdated(content::DownloadItem* download) {
[item_controller_ updateToolTip];
}
+ if (!download_model_.ShouldShowInShelf()) {
asanka 2015/03/02 21:49:33 Nit: shall we move this to the top? If this condit
Dan Beam 2015/03/02 22:04:07 Done.
+ [item_controller_ remove]; // We're deleted now!
+ return;
+ }
+
switch (download->GetState()) {
case DownloadItem::COMPLETE:
if (download_model_.ShouldRemoveFromShelfWhenComplete()) {

Powered by Google App Engine
This is Rietveld 408576698