| Index: chrome/browser/download/notification/download_group_notification.cc
|
| diff --git a/chrome/browser/download/notification/download_group_notification.cc b/chrome/browser/download/notification/download_group_notification.cc
|
| index 2b578f523d96d21ac29ff8e0d084f8fb43d7ca65..020af24680cfd53038f265cccaabafe23f15948a 100644
|
| --- a/chrome/browser/download/notification/download_group_notification.cc
|
| +++ b/chrome/browser/download/notification/download_group_notification.cc
|
| @@ -97,10 +97,15 @@ void DownloadGroupNotification::OnDownloadAdded(
|
| content::DownloadItem* download) {
|
| if (items_.find(download) == items_.end()) {
|
| items_.insert(download);
|
| + int inprogress_download_count = 0;
|
| // If new download is started and there are more than 2 downloads in total,
|
| // show the group notification.
|
| - if (items_.size() >= 2)
|
| - Show();
|
| + for (auto it = items_.begin(); it != items_.end(); it++) {
|
| + if (!(*it)->IsDone() && ++inprogress_download_count >= 2) {
|
| + Show();
|
| + break;
|
| + }
|
| + }
|
| }
|
| }
|
|
|
|
|