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

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

Issue 2287783002: Remove stl_util's STLValueDeleter. (Closed)
Patch Set: rebase Created 4 years, 4 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 3b45d8618a4ef6d33d42d285fe37ad9560446c6c..a3e9e761a0c45ae301902c0566fee54aa2cffb9d 100644
--- a/chrome/browser/download/notification/download_notification_manager.h
+++ b/chrome/browser/download/notification/download_notification_manager.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_MANAGER_H_
#define CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_MANAGER_H_
+#include <memory>
#include <set>
#include "chrome/browser/download/download_ui_controller.h"
@@ -29,12 +30,8 @@ class DownloadNotificationManager : public DownloadUIController::Delegate {
friend class test::DownloadItemNotificationTest;
Profile* main_profile_ = nullptr;
- std::map<Profile*, DownloadNotificationManagerForProfile*>
+ std::map<Profile*, std::unique_ptr<DownloadNotificationManagerForProfile>>
manager_for_profile_;
-
- base::STLValueDeleter<
- std::map<Profile*, DownloadNotificationManagerForProfile*>>
- items_deleter_;
};
class DownloadNotificationManagerForProfile
@@ -65,14 +62,11 @@ class DownloadNotificationManagerForProfile
Profile* profile_ = nullptr;
DownloadNotificationManager* parent_manager_; // weak
std::set<content::DownloadItem*> downloading_items_;
- std::map<content::DownloadItem*, DownloadItemNotification*> items_;
+ std::map<content::DownloadItem*, std::unique_ptr<DownloadItemNotification>>
+ items_;
// Pointer to the message center instance.
message_center::MessageCenter* message_center_;
-
- base::STLValueDeleter<
- std::map<content::DownloadItem*, DownloadItemNotification*>>
- items_deleter_;
};
#endif // CHROME_BROWSER_DOWNLOAD_NOTIFICATION_DOWNLOAD_NOTIFICATION_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698