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

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, 10 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..f721596d198a0e029e7076a13a3812f63489de10 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,8 +153,7 @@ 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)) {
sky 2016/03/02 17:19:34 nit: no {}
chakshu 2016/03/07 08:10:46 Done.
selected_device.clear();
}
if (devices.empty()) {

Powered by Google App Engine
This is Rietveld 408576698