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

Unified Diff: ui/events/ozone/evdev/touch_noise/touch_noise_finder.cc

Issue 2474163003: Remove stl_util's deletion function use from ui/. (Closed)
Patch Set: braces Created 4 years, 1 month 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/events/ozone/evdev/touch_noise/touch_noise_finder.h ('k') | ui/wm/core/transient_window_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/touch_noise/touch_noise_finder.cc
diff --git a/ui/events/ozone/evdev/touch_noise/touch_noise_finder.cc b/ui/events/ozone/evdev/touch_noise/touch_noise_finder.cc
index c2057abdcae6d6ff18f71b973ef83965002d67b0..63a5733aaa9104907e92c84213e67555fadd3982 100644
--- a/ui/events/ozone/evdev/touch_noise/touch_noise_finder.cc
+++ b/ui/events/ozone/evdev/touch_noise/touch_noise_finder.cc
@@ -4,8 +4,8 @@
#include "ui/events/ozone/evdev/touch_noise/touch_noise_finder.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
-#include "base/stl_util.h"
#include "ui/events/event_utils.h"
#include "ui/events/ozone/evdev/touch_noise/far_apart_taps_touch_noise_filter.h"
#include "ui/events/ozone/evdev/touch_noise/horizontally_aligned_touch_noise_filter.h"
@@ -15,13 +15,12 @@
namespace ui {
TouchNoiseFinder::TouchNoiseFinder() : last_noise_time_(ui::EventTimeForNow()) {
- filters_.push_back(new FarApartTapsTouchNoiseFilter);
- filters_.push_back(new HorizontallyAlignedTouchNoiseFilter);
- filters_.push_back(new SinglePositionTouchNoiseFilter);
+ filters_.push_back(base::MakeUnique<FarApartTapsTouchNoiseFilter>());
+ filters_.push_back(base::MakeUnique<HorizontallyAlignedTouchNoiseFilter>());
+ filters_.push_back(base::MakeUnique<SinglePositionTouchNoiseFilter>());
}
TouchNoiseFinder::~TouchNoiseFinder() {
- base::STLDeleteElements(&filters_);
}
void TouchNoiseFinder::HandleTouches(
@@ -34,7 +33,7 @@ void TouchNoiseFinder::HandleTouches(
bool had_noise = slots_with_noise_.any();
- for (TouchNoiseFilter* filter : filters_)
+ for (const auto& filter : filters_)
filter->Filter(touches, time, &slots_with_noise_);
RecordUMA(had_noise, time);
« no previous file with comments | « ui/events/ozone/evdev/touch_noise/touch_noise_finder.h ('k') | ui/wm/core/transient_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698