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

Unified Diff: net/cert/x509_certificate.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/base/network_throttle_manager_impl.cc ('k') | net/cert/x509_certificate_bytes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_certificate.cc
diff --git a/net/cert/x509_certificate.cc b/net/cert/x509_certificate.cc
index cf5d2f6222e0fc59cc493ee338cd6d113db89b8e..e60a697bce2a6bfc8ee5fda4107106542d38b75f 100644
--- a/net/cert/x509_certificate.cc
+++ b/net/cert/x509_certificate.cc
@@ -7,7 +7,6 @@
#include <limits.h>
#include <stdlib.h>
-#include <algorithm>
#include <map>
#include <memory>
#include <string>
@@ -21,6 +20,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/pickle.h"
#include "base/profiler/scoped_tracker.h"
+#include "base/stl_util.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
#include "base/synchronization/lock.h"
@@ -540,8 +540,7 @@ bool X509Certificate::VerifyHostname(
base::StringPiece ip_addr_string(
reinterpret_cast<const char*>(host_info.address),
host_info.AddressLength());
- return std::find(cert_san_ip_addrs.begin(), cert_san_ip_addrs.end(),
- ip_addr_string) != cert_san_ip_addrs.end();
+ return base::ContainsValue(cert_san_ip_addrs, ip_addr_string);
}
// |reference_domain| is the remainder of |host| after the leading host
« no previous file with comments | « net/base/network_throttle_manager_impl.cc ('k') | net/cert/x509_certificate_bytes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698