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

Unified Diff: net/cert/x509_certificate_bytes.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/cert/x509_certificate.cc ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_certificate_bytes.cc
diff --git a/net/cert/x509_certificate_bytes.cc b/net/cert/x509_certificate_bytes.cc
index 7cada9faca35f330e519c17f36fb556163599fb7..90d381314c4eac48672216e8aba1b0f97790c305 100644
--- a/net/cert/x509_certificate_bytes.cc
+++ b/net/cert/x509_certificate_bytes.cc
@@ -6,6 +6,7 @@
#include "base/numerics/safe_conversions.h"
#include "base/pickle.h"
+#include "base/stl_util.h"
#include "crypto/openssl_util.h"
#include "net/base/ip_address.h"
#include "net/cert/asn1_util.h"
@@ -263,15 +264,13 @@ bool X509Certificate::IsIssuedByEncoded(
std::string normalized_cert_issuer;
if (!GetNormalizedCertIssuer(cert_handle_, &normalized_cert_issuer))
return false;
- if (std::find(normalized_issuers.begin(), normalized_issuers.end(),
- normalized_cert_issuer) != normalized_issuers.end())
+ if (base::ContainsValue(normalized_issuers, normalized_cert_issuer))
return true;
for (CRYPTO_BUFFER* intermediate : intermediate_ca_certs_) {
if (!GetNormalizedCertIssuer(intermediate, &normalized_cert_issuer))
return false;
- if (std::find(normalized_issuers.begin(), normalized_issuers.end(),
- normalized_cert_issuer) != normalized_issuers.end())
+ if (base::ContainsValue(normalized_issuers, normalized_cert_issuer))
return true;
}
return false;
« no previous file with comments | « net/cert/x509_certificate.cc ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698