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

Unified Diff: chrome/browser/devtools/device/tcp_device_provider.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/devtools/device/tcp_device_provider.cc
diff --git a/chrome/browser/devtools/device/tcp_device_provider.cc b/chrome/browser/devtools/device/tcp_device_provider.cc
index 45307c63340a5a82b93ef4a6f3ece345b475f996..fce75f0b707f2cedcdc770fe9d155cb870a091cf 100644
--- a/chrome/browser/devtools/device/tcp_device_provider.cc
+++ b/chrome/browser/devtools/device/tcp_device_provider.cc
@@ -4,11 +4,11 @@
#include "chrome/browser/devtools/device/tcp_device_provider.h"
-#include <algorithm>
#include <utility>
#include "base/location.h"
#include "base/single_thread_task_runner.h"
+#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/thread_task_runner_handle.h"
@@ -81,7 +81,7 @@ void TCPDeviceProvider::QueryDevices(const SerialsCallback& callback) {
std::vector<std::string> result;
for (const net::HostPortPair& target : targets_) {
const std::string& host = target.host();
- if (std::find(result.begin(), result.end(), host) != result.end())
+ if (ContainsValue(result, host))
continue;
result.push_back(host);
}
« no previous file with comments | « chrome/browser/chromeos/platform_keys/platform_keys_service.cc ('k') | chrome/browser/extensions/external_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698