summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/message_center/popup_timer.cc7
-rw-r--r--ui/message_center/popup_timer.h5
2 files changed, 6 insertions, 6 deletions
diff --git a/ui/message_center/popup_timer.cc b/ui/message_center/popup_timer.cc
index dc27866..f19da62 100644
--- a/ui/message_center/popup_timer.cc
+++ b/ui/message_center/popup_timer.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/stl_util.h"
#include "ui/message_center/message_center_style.h"
#include "ui/message_center/message_center_types.h"
#include "ui/message_center/notification.h"
@@ -93,11 +94,11 @@ void PopupTimersController::StartTimer(const std::string& id,
scoped_ptr<PopupTimer> timer(new PopupTimer(id, timeout, AsWeakPtr()));
timer->Start();
- popup_timers_.insert(id, timer.Pass());
+ popup_timers_.insert(std::make_pair(id, std::move(timer)));
}
void PopupTimersController::StartAll() {
- for (auto& iter : popup_timers_)
+ for (const auto& iter : popup_timers_)
iter.second->Start();
}
@@ -115,7 +116,7 @@ void PopupTimersController::PauseTimer(const std::string& id) {
}
void PopupTimersController::PauseAll() {
- for (auto& iter : popup_timers_)
+ for (const auto& iter : popup_timers_)
iter.second->Pause();
}
diff --git a/ui/message_center/popup_timer.h b/ui/message_center/popup_timer.h
index f730732..a822ca8 100644
--- a/ui/message_center/popup_timer.h
+++ b/ui/message_center/popup_timer.h
@@ -5,10 +5,10 @@
#ifndef UI_MESSAGE_CENTER_POPUP_TIMER_H_
#define UI_MESSAGE_CENTER_POPUP_TIMER_H_
+#include <map>
#include <string>
#include <vector>
-#include "base/containers/scoped_ptr_map.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
@@ -118,8 +118,7 @@ class MESSAGE_CENTER_EXPORT PopupTimersController
MessageCenter* message_center_;
// The PopupTimerCollection contains all the managed timers by their ID.
- typedef base::ScopedPtrMap<std::string, scoped_ptr<PopupTimer>>
- PopupTimerCollection;
+ using PopupTimerCollection = std::map<std::string, scoped_ptr<PopupTimer>>;
PopupTimerCollection popup_timers_;
DISALLOW_COPY_AND_ASSIGN(PopupTimersController);