| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <cert.h> | 5 #include <cert.h> |
| 6 #include <cryptohi.h> | 6 #include <cryptohi.h> |
| 7 #include <keyhi.h> | 7 #include <keyhi.h> |
| 8 #include <secder.h> | 8 #include <secder.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 std::string() /* no error */); | 547 std::string() /* no error */); |
| 548 } | 548 } |
| 549 | 549 |
| 550 // Continues selecting certificates on the IO thread. Used by | 550 // Continues selecting certificates on the IO thread. Used by |
| 551 // SelectClientCertificates(). | 551 // SelectClientCertificates(). |
| 552 void SelectCertificatesOnIOThread( | 552 void SelectCertificatesOnIOThread( |
| 553 std::unique_ptr<SelectCertificatesState> state) { | 553 std::unique_ptr<SelectCertificatesState> state) { |
| 554 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 554 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 555 state->cert_store_.reset(new ClientCertStoreChromeOS( | 555 state->cert_store_.reset(new ClientCertStoreChromeOS( |
| 556 nullptr, // no additional provider | 556 nullptr, // no additional provider |
| 557 base::WrapUnique(new ClientCertFilterChromeOS(state->use_system_key_slot_, | 557 base::MakeUnique<ClientCertFilterChromeOS>(state->use_system_key_slot_, |
| 558 state->username_hash_)), | 558 state->username_hash_), |
| 559 ClientCertStoreChromeOS::PasswordDelegateFactory())); | 559 ClientCertStoreChromeOS::PasswordDelegateFactory())); |
| 560 | 560 |
| 561 state->certs_.reset(new net::CertificateList); | 561 state->certs_.reset(new net::CertificateList); |
| 562 | 562 |
| 563 SelectCertificatesState* state_ptr = state.get(); | 563 SelectCertificatesState* state_ptr = state.get(); |
| 564 state_ptr->cert_store_->GetClientCerts( | 564 state_ptr->cert_store_->GetClientCerts( |
| 565 *state_ptr->cert_request_info_, state_ptr->certs_.get(), | 565 *state_ptr->cert_request_info_, state_ptr->certs_.get(), |
| 566 base::Bind(&DidSelectCertificatesOnIOThread, base::Passed(&state))); | 566 base::Bind(&DidSelectCertificatesOnIOThread, base::Passed(&state))); |
| 567 } | 567 } |
| 568 | 568 |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 NSSOperationState* state_ptr = state.get(); | 898 NSSOperationState* state_ptr = state.get(); |
| 899 GetCertDatabase(std::string() /* don't get any specific slot */, | 899 GetCertDatabase(std::string() /* don't get any specific slot */, |
| 900 base::Bind(&GetTokensWithDB, base::Passed(&state)), | 900 base::Bind(&GetTokensWithDB, base::Passed(&state)), |
| 901 browser_context, | 901 browser_context, |
| 902 state_ptr); | 902 state_ptr); |
| 903 } | 903 } |
| 904 | 904 |
| 905 } // namespace platform_keys | 905 } // namespace platform_keys |
| 906 | 906 |
| 907 } // namespace chromeos | 907 } // namespace chromeos |
| OLD | NEW |