Index: chrome/browser/chromeos/platform_keys/platform_keys_nss.cc |
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc b/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc |
index 3c6cf433e04bdfe0cc4841793fa8ff1a2745765d..6a8c9aee3de1a0d14baa1e314742381c62efe870 100644 |
--- a/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc |
+++ b/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc |
@@ -243,7 +243,6 @@ class SelectCertificatesState : public NSSOperationState { |
const bool use_system_key_slot_; |
scoped_refptr<net::SSLCertRequestInfo> cert_request_info_; |
std::unique_ptr<net::ClientCertStore> cert_store_; |
- std::unique_ptr<net::CertificateList> certs_; |
private: |
// Must be called on origin thread, therefore use CallBack(). |
@@ -550,9 +549,11 @@ void SignRSAWithDB(std::unique_ptr<SignRSAState> state, |
// of net::CertificateList and calls back. Used by |
// SelectCertificatesOnIOThread(). |
void DidSelectCertificatesOnIOThread( |
- std::unique_ptr<SelectCertificatesState> state) { |
+ std::unique_ptr<SelectCertificatesState> state, |
+ net::CertificateList certs) { |
DCHECK_CURRENTLY_ON(BrowserThread::IO); |
- state->CallBack(FROM_HERE, std::move(state->certs_), |
+ state->CallBack(FROM_HERE, |
+ base::MakeUnique<net::CertificateList>(std::move(certs)), |
std::string() /* no error */); |
} |
@@ -567,11 +568,9 @@ void SelectCertificatesOnIOThread( |
state->username_hash_), |
ClientCertStoreChromeOS::PasswordDelegateFactory())); |
- state->certs_.reset(new net::CertificateList); |
- |
SelectCertificatesState* state_ptr = state.get(); |
state_ptr->cert_store_->GetClientCerts( |
- *state_ptr->cert_request_info_, state_ptr->certs_.get(), |
+ *state_ptr->cert_request_info_, |
base::Bind(&DidSelectCertificatesOnIOThread, base::Passed(&state))); |
} |