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

Unified Diff: chrome/browser/chromeos/login/screens/controller_pairing_screen.cc

Issue 1715683002: chrome: Use base's ContainsValue helper function instead of std::find (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per latest code Created 4 years, 8 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
Index: chrome/browser/chromeos/login/screens/controller_pairing_screen.cc
diff --git a/chrome/browser/chromeos/login/screens/controller_pairing_screen.cc b/chrome/browser/chromeos/login/screens/controller_pairing_screen.cc
index 02504a6b6e96cea7d47c1e15367cbc7da3805a01..e203af1bdea8f1908509a057386c7dbb10a7e0e7 100644
--- a/chrome/browser/chromeos/login/screens/controller_pairing_screen.cc
+++ b/chrome/browser/chromeos/login/screens/controller_pairing_screen.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/chromeos/login/screens/controller_pairing_screen.h"
#include "base/command_line.h"
+#include "base/stl_util.h"
#include "base/values.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "google_apis/gaia/gaia_auth_util.h"
@@ -152,10 +153,8 @@ void ControllerPairingScreen::DiscoveredDevicesListChanged() {
kContextKeyPage,
devices.empty() ? kPageDevicesDiscovery : kPageDeviceSelect);
std::string selected_device = context_.GetString(kContextKeySelectedDevice);
- if (std::find(devices.begin(), devices.end(), selected_device) ==
- devices.end()) {
+ if (!ContainsValue(devices, selected_device))
selected_device.clear();
- }
if (devices.empty()) {
device_preselected_ = false;
} else if (!device_preselected_) {
« no previous file with comments | « chrome/browser/apps/app_window_registry_util.cc ('k') | chrome/browser/chromeos/platform_keys/platform_keys_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698