Chromium Code Reviews| Index: chromeos/network/cert_loader.h |
| diff --git a/chromeos/network/cert_loader.h b/chromeos/network/cert_loader.h |
| index a57d29a362069c05badc8527e98e6cd0816b5e9c..bdc8ccf4b3bd4e7a3894b6b7ace86be8050156d2 100644 |
| --- a/chromeos/network/cert_loader.h |
| +++ b/chromeos/network/cert_loader.h |
| @@ -19,6 +19,10 @@ |
| #include "net/cert/cert_database.h" |
| #include "net/cert/x509_certificate.h" |
| +namespace base { |
| +class SequencedTaskRunner; |
| +} |
| + |
| namespace crypto { |
| class SymmetricKey; |
| } |
| @@ -77,8 +81,12 @@ class CHROMEOS_EXPORT CertLoader : public net::CertDatabase::Observer, |
| private: |
| friend class NetworkHandler; |
| CertLoader(); |
| + // |crypto_task_runner| is the task runner that any synchronous crypto calls |
| + // should be made from. In Chrome this is the IO thread. |
|
Ryan Sleevi
2013/06/06 23:03:41
Given that chromeos/ is only allowed to depend on
stevenjb
2013/06/07 02:37:47
This is still the chrome project codebase. We comm
Ryan Sleevi
2013/06/07 23:12:43
Sorry I wasn't clear here.
Even though this is th
|
| + void Init(const scoped_refptr<base::SequencedTaskRunner>& crypto_task_runner); |
| void RequestCertificates(); |
| + void CallOpenPersistentNSSDB(); |
| // This is the cyclic chain of callbacks to initialize the TPM token and to |
| // kick off the update of the certificate list. |
| @@ -91,6 +99,7 @@ class CHROMEOS_EXPORT CertLoader : public net::CertDatabase::Observer, |
| void OnPkcs11GetTpmTokenInfo(DBusMethodCallStatus call_status, |
| const std::string& token_name, |
| const std::string& user_pin); |
| + void CallInitializeTPMToken(); |
| void InitializeNSSForTPMToken(); |
| // These calls handle the updating of the certificate list after the TPM token |
| @@ -123,6 +132,7 @@ class CHROMEOS_EXPORT CertLoader : public net::CertDatabase::Observer, |
| TPM_ENABLED, |
| TPM_TOKEN_READY, |
| TPM_TOKEN_INFO_RECEIVED, |
| + TPM_TOKEN_INITIALIZED, |
| TPM_TOKEN_NSS_INITIALIZED, |
| }; |
| TPMTokenState tpm_token_state_; |
| @@ -149,6 +159,9 @@ class CHROMEOS_EXPORT CertLoader : public net::CertDatabase::Observer, |
| // certificate list. |
| base::WeakPtrFactory<CertLoader> update_certificates_factory_; |
| + scoped_refptr<base::SequencedTaskRunner> main_task_runner_; |
| + scoped_refptr<base::SequencedTaskRunner> crypto_task_runner_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(CertLoader); |
| }; |