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

Unified Diff: ui/message_center/views/notification_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 | « ui/message_center/views/message_list_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/notification_view.cc
diff --git a/ui/message_center/views/notification_view.cc b/ui/message_center/views/notification_view.cc
index 6475098832d0b18cc9fc78bb026152c4d934c825..f58889727ee6331d12e31fe4d3ba722440b67791 100644
--- a/ui/message_center/views/notification_view.cc
+++ b/ui/message_center/views/notification_view.cc
@@ -8,7 +8,6 @@
#include "base/command_line.h"
#include "base/macros.h"
-#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "components/url_formatter/elide_url.h"
@@ -509,8 +508,8 @@ void NotificationView::CreateOrUpdateProgressBarView(
void NotificationView::CreateOrUpdateListItemViews(
const Notification& notification) {
- for (size_t i = 0; i < item_views_.size(); ++i)
- delete item_views_[i];
+ for (auto item_view : item_views_)
+ delete item_view;
item_views_.clear();
int padding = kMessageLineHeight - views::Label().font_list().GetHeight();
@@ -590,9 +589,12 @@ void NotificationView::CreateOrUpdateActionButtonViews(
bool new_buttons = action_buttons_.size() != buttons.size();
if (new_buttons || buttons.size() == 0) {
- // STLDeleteElements also clears the container.
- base::STLDeleteElements(&separators_);
- base::STLDeleteElements(&action_buttons_);
+ for (auto item : separators_)
+ delete item;
+ separators_.clear();
+ for (auto item : action_buttons_)
+ delete item;
+ action_buttons_.clear();
}
DCHECK(bottom_view_);
« no previous file with comments | « ui/message_center/views/message_list_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698