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

Unified Diff: net/dns/host_resolver_impl_unittest.cc

Issue 2943703002: Use ContainsValue() instead of std::find() in net/ (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 | « net/cookies/cookie_monster.cc ('k') | net/extras/sqlite/sqlite_channel_id_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/host_resolver_impl_unittest.cc
diff --git a/net/dns/host_resolver_impl_unittest.cc b/net/dns/host_resolver_impl_unittest.cc
index 0869910bee28ea58c92dff4bf8dcd4f2a652efb1..e6f5e8a5b74894a81342bdbdc19c507ae2306fe3 100644
--- a/net/dns/host_resolver_impl_unittest.cc
+++ b/net/dns/host_resolver_impl_unittest.cc
@@ -4,7 +4,6 @@
#include "net/dns/host_resolver_impl.h"
-#include <algorithm>
#include <memory>
#include <string>
#include <tuple>
@@ -19,6 +18,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
+#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/condition_variable.h"
@@ -203,9 +203,7 @@ bool AddressListContains(const AddressList& list,
IPAddress ip;
bool rv = ip.AssignFromIPLiteral(address);
DCHECK(rv);
- return std::find(list.begin(),
- list.end(),
- IPEndPoint(ip, port)) != list.end();
+ return base::ContainsValue(list, IPEndPoint(ip, port));
}
// A wrapper for requests to a HostResolver.
« no previous file with comments | « net/cookies/cookie_monster.cc ('k') | net/extras/sqlite/sqlite_channel_id_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698