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

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: Rebase. 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
« no previous file with comments | « ui/gfx/image/image.cc ('k') | ui/message_center/message_center_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..af71100bbd4456b24f0319ec2f716e23a6baf576 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 base::ScopedPtrMap<std::string, scoped_ptr<PopupTimer>>
+ PopupTimerCollection;
PopupTimerCollection popup_timers_;
- STLValueDeleter<PopupTimerCollection> popup_deleter_;
DISALLOW_COPY_AND_ASSIGN(PopupTimersController);
};
« no previous file with comments | « ui/gfx/image/image.cc ('k') | ui/message_center/message_center_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698