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

Unified Diff: ui/message_center/views/message_list_view.cc

Issue 2440443005: Remove stl_util's deletion function use from ui/message_center/. (Closed)
Patch Set: no test changes Created 4 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
« no previous file with comments | « no previous file | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/message_list_view.cc
diff --git a/ui/message_center/views/message_list_view.cc b/ui/message_center/views/message_list_view.cc
index f2efc22f410c2a1886f2078580446a430793d8d6..4dc04a60b0917175cc6fe0cc5f415a8ad66a4a6a 100644
--- a/ui/message_center/views/message_list_view.cc
+++ b/ui/message_center/views/message_list_view.cc
@@ -185,8 +185,8 @@ void MessageListView::ResetRepositionSession() {
has_deferred_task_ = false;
// cancel cause OnBoundsAnimatorDone which deletes |deleted_when_done_|.
animator_.Cancel();
- base::STLDeleteContainerPointers(deleting_views_.begin(),
- deleting_views_.end());
+ for (auto view : deleting_views_)
+ delete view;
deleting_views_.clear();
adding_views_.clear();
}
@@ -218,17 +218,16 @@ void MessageListView::ClearAllClosableNotifications(
void MessageListView::OnBoundsAnimatorProgressed(
views::BoundsAnimator* animator) {
DCHECK_EQ(&animator_, animator);
- for (std::set<views::View*>::iterator iter = deleted_when_done_.begin();
- iter != deleted_when_done_.end(); ++iter) {
- const gfx::SlideAnimation* animation = animator->GetAnimationForView(*iter);
+ for (auto view : deleted_when_done_) {
+ const gfx::SlideAnimation* animation = animator->GetAnimationForView(view);
if (animation)
- (*iter)->layer()->SetOpacity(animation->CurrentValueBetween(1.0, 0.0));
+ view->layer()->SetOpacity(animation->CurrentValueBetween(1.0, 0.0));
}
}
void MessageListView::OnBoundsAnimatorDone(views::BoundsAnimator* animator) {
- base::STLDeleteContainerPointers(deleted_when_done_.begin(),
- deleted_when_done_.end());
+ for (auto view : deleted_when_done_)
+ delete view;
deleted_when_done_.clear();
if (clear_all_started_) {
@@ -379,7 +378,7 @@ void MessageListView::AnimateNotificationsAboveTarget() {
}
// If the calculated length is changed from |repositon_top_|, it means that
- // some of items above the targe are updated and their height are changed.
+ // some of items above the target are updated and their height are changed.
// Adjust the vertical length above the target.
if (reposition_top_ != vertical_gap_to_target_from_top) {
fixed_height_ -= reposition_top_ - vertical_gap_to_target_from_top;
« no previous file with comments | « no previous file | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698