Chromium Code Reviews| Index: chromeos/cert_loader.h |
| diff --git a/chromeos/cert_loader.h b/chromeos/cert_loader.h |
| index 75d2cd07a3d56bd6d7f7a5a59dfa027a9a47d1f3..223003f141b3c6ca53e84a57e2e3d0d6f3ec2d14 100644 |
| --- a/chromeos/cert_loader.h |
| +++ b/chromeos/cert_loader.h |
| @@ -69,10 +69,15 @@ class CHROMEOS_EXPORT CertLoader : public net::CertDatabase::Observer, |
| static std::string GetPkcs11IdForCert(const net::X509Certificate& cert); |
| + // By default, CertLoader tries to load the TPMToken only if running in a |
| + // ChromeOS environment. If this function is called after Initialize() and |
| + // before SetCryptoTaskRunner(). |
|
stevenjb
2013/08/09 22:22:44
Second sentence is incomplete / unclear.
pneubeck (no reviews)
2013/08/09 22:46:44
Done.
|
| + void InitializeTPMForTest(); |
| + |
| // |crypto_task_runner| is the task runner that any synchronous crypto calls |
| // should be made from, e.g. in Chrome this is the IO thread. Must be called |
| - // after the thread is started. Certificate loading will not happen unless |
| - // this is set. |
| + // after the thread is started. Starts TPM initialization and Certificate |
| + // loading. |
| void SetCryptoTaskRunner( |
| const scoped_refptr<base::SequencedTaskRunner>& crypto_task_runner); |
| @@ -105,7 +110,6 @@ class CHROMEOS_EXPORT CertLoader : public net::CertDatabase::Observer, |
| CertLoader(); |
| virtual ~CertLoader(); |
| - void Init(); |
| void MaybeRequestCertificates(); |
| // This is the cyclic chain of callbacks to initialize the TPM token and to |
| @@ -124,7 +128,15 @@ class CHROMEOS_EXPORT CertLoader : public net::CertDatabase::Observer, |
| // These calls handle the updating of the certificate list after the TPM token |
| // was initialized. |
| + |
| + // Start certificate loading. Must be called at most once. |
| void StartLoadCertificates(); |
| + |
| + // Trigger a certificate load. If a certificate loading task is already in |
| + // progress, will start a reload once the current task finised. |
| + void LoadCertificates(); |
| + |
| + // Called if a certificate load task is finished. |
| void UpdateCertificates(net::CertificateList* cert_list); |
| void NotifyCertificatesLoaded(bool initial_load); |
| @@ -137,6 +149,8 @@ class CHROMEOS_EXPORT CertLoader : public net::CertDatabase::Observer, |
| // LoginState::Observer |
| virtual void LoggedInStateChanged(LoginState::LoggedInState state) OVERRIDE; |
| + bool initialize_tpm_for_test_; |
| + |
| ObserverList<Observer> observers_; |
| bool certificates_requested_; |