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

Unified Diff: chrome/browser/download/notification/download_notification_manager.h

Issue 1389273004: Update first download notification correctly if there are multiple notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update the download manually in the test Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/download/notification/download_notification_manager.h
diff --git a/chrome/browser/download/notification/download_notification_manager.h b/chrome/browser/download/notification/download_notification_manager.h
index dbc84e86dfe2c016b4275fad842373331c25859b..7490c1a0396dd0923b7e81dc37341eb737e2bff4 100644
--- a/chrome/browser/download/notification/download_notification_manager.h
+++ b/chrome/browser/download/notification/download_notification_manager.h
@@ -45,6 +45,10 @@ class DownloadNotificationManagerForProfile
Profile* profile, DownloadNotificationManager* parent_manager);
~DownloadNotificationManagerForProfile() override;
+ message_center::MessageCenter* message_center() const {
+ return message_center_;
+ }
+
// DownloadItem::Observer overrides:
void OnDownloadUpdated(content::DownloadItem* download) override;
void OnDownloadOpened(content::DownloadItem* download) override;
@@ -56,11 +60,17 @@ class DownloadNotificationManagerForProfile
private:
friend class test::DownloadItemNotificationTest;
+ void OverrideMessageCenterForTest(
+ message_center::MessageCenter* message_center);
+
Profile* profile_ = nullptr;
DownloadNotificationManager* parent_manager_; // weak
std::set<content::DownloadItem*> downloading_items_;
std::map<content::DownloadItem*, DownloadItemNotification*> items_;
+ // Pointer to the message center instance.
+ message_center::MessageCenter* message_center_;
+
STLValueDeleter<std::map<content::DownloadItem*, DownloadItemNotification*>>
items_deleter_;
};

Powered by Google App Engine
This is Rietveld 408576698