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

Unified Diff: ui/message_center/message_center_impl.h

Issue 1096983002: Update usages of std::map to use ScopedPtrMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@passwordmanager-scopedmemory
Patch Set: Fix Mac compile. Created 5 years, 6 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: ui/message_center/message_center_impl.h
diff --git a/ui/message_center/message_center_impl.h b/ui/message_center/message_center_impl.h
index 272ea2cf8c315e32f8176a376cac4b9b9371e097..fb226f1213e7651d0b24d0388b33761fbd766c56 100644
--- a/ui/message_center/message_center_impl.h
+++ b/ui/message_center/message_center_impl.h
@@ -8,9 +8,10 @@
#include <string>
#include <vector>
+#include "base/containers/scoped_ptr_map.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
-#include "base/stl_util.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "ui/message_center/message_center.h"
@@ -122,12 +123,10 @@ class MESSAGE_CENTER_EXPORT PopupTimersController
// Weak, this class is owned by MessageCenterImpl.
MessageCenter* message_center_;
- // The PopupTimerCollection contains all the managed timers by their ID. They
- // are owned by this class, and deleted by |popup_deleter_| on destructon or
- // when explicitly cancelled.
- typedef std::map<std::string, PopupTimer*> PopupTimerCollection;
+ // The PopupTimerCollection contains all the managed timers by their ID.
+ typedef ScopedPtrMap<std::string, scoped_ptr<PopupTimer>>
+ PopupTimerCollection;
PopupTimerCollection popup_timers_;
- STLValueDeleter<PopupTimerCollection> popup_deleter_;
DISALLOW_COPY_AND_ASSIGN(PopupTimersController);
};

Powered by Google App Engine
This is Rietveld 408576698