chore: change some for loops to range-based (#26182)

This commit is contained in:
David Sanders 2020-10-27 10:22:24 -07:00 committed by GitHub
parent d8167ce138
commit 422190e1ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 16 deletions

View file

@ -536,10 +536,10 @@ void OnClientCertificateSelected(
data.c_str(), data.length(), net::X509Certificate::FORMAT_AUTO);
if (!certs.empty()) {
scoped_refptr<net::X509Certificate> cert(certs[0].get());
for (size_t i = 0; i < identities->size(); ++i) {
if (cert->EqualsExcludingChain((*identities)[i]->certificate())) {
for (auto& identity : *identities) {
if (cert->EqualsExcludingChain(identity->certificate())) {
net::ClientCertIdentity::SelfOwningAcquirePrivateKey(
std::move((*identities)[i]),
std::move(identity),
base::BindRepeating(&GotPrivateKey, delegate, std::move(cert)));
break;
}