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

Unified Diff: ui/display/manager/display_manager.cc

Issue 2926383003: Use ContainsValue() instead of std::find() in ui/aura, ui/display and ui/events (Closed)
Patch Set: Created 3 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/aura/window_event_dispatcher_unittest.cc ('k') | ui/display/manager/managed_display_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/manager/display_manager.cc
diff --git a/ui/display/manager/display_manager.cc b/ui/display/manager/display_manager.cc
index 1873139ddc04c10b522f04b5da90583fe854eee5..05825cacfd1db31d8e445ca7bf12abf56a68109b 100644
--- a/ui/display/manager/display_manager.cc
+++ b/ui/display/manager/display_manager.cc
@@ -20,6 +20,7 @@
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/run_loop.h"
+#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
@@ -798,8 +799,7 @@ void DisplayManager::UpdateDisplaysWith(
std::vector<size_t> updated_indices;
UpdateNonPrimaryDisplayBoundsForLayout(&new_displays, &updated_indices);
for (size_t updated_index : updated_indices) {
- if (std::find(added_display_indices.begin(), added_display_indices.end(),
- updated_index) == added_display_indices.end()) {
+ if (!base::ContainsValue(added_display_indices, updated_index)) {
uint32_t metrics = DisplayObserver::DISPLAY_METRIC_BOUNDS |
DisplayObserver::DISPLAY_METRIC_WORK_AREA;
if (display_changes.find(updated_index) != display_changes.end())
« no previous file with comments | « ui/aura/window_event_dispatcher_unittest.cc ('k') | ui/display/manager/managed_display_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698