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

Unified Diff: chrome/browser/extensions/api/platform_keys/platform_keys_api.cc

Issue 1833773002: [Extensions] Convert APIs to use movable types [8] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/extensions/api/platform_keys/platform_keys_api.cc
diff --git a/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc b/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc
index 65e143e00a672dc1c73f4f04b60bf18a4350abf0..b2b80ad07849d1e9e1b65304322ac0ff8576be10 100644
--- a/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc
+++ b/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc
@@ -248,7 +248,7 @@ void PlatformKeysInternalSelectClientCertificatesFunction::
return;
}
DCHECK(matches);
- std::vector<linked_ptr<api_pk::Match>> result_matches;
+ std::vector<api_pk::Match> result_matches;
for (const scoped_refptr<net::X509Certificate>& match : *matches) {
PublicKeyInfo key_info;
key_info.public_key_spki_der =
@@ -263,16 +263,16 @@ void PlatformKeysInternalSelectClientCertificatesFunction::
continue;
}
- linked_ptr<api_pk::Match> result_match(new api_pk::Match);
+ api_pk::Match result_match;
std::string der_encoded_cert;
net::X509Certificate::GetDEREncoded(match->os_cert_handle(),
&der_encoded_cert);
- result_match->certificate.assign(der_encoded_cert.begin(),
- der_encoded_cert.end());
+ result_match.certificate.assign(der_encoded_cert.begin(),
+ der_encoded_cert.end());
BuildWebCryptoRSAAlgorithmDictionary(
- key_info, &result_match->key_algorithm.additional_properties);
- result_matches.push_back(result_match);
+ key_info, &result_match.key_algorithm.additional_properties);
+ result_matches.push_back(std::move(result_match));
}
Respond(ArgumentList(
api_pki::SelectClientCertificates::Results::Create(result_matches)));

Powered by Google App Engine
This is Rietveld 408576698