Index: chromeos/tpm/tpm_token_loader.h |
diff --git a/chromeos/tpm/tpm_token_loader.h b/chromeos/tpm/tpm_token_loader.h |
index bddbe24587c50230076ac94afe239acb4f0b9fd5..6add4a600b25320bf9156b95935fcef38df0e623 100644 |
--- a/chromeos/tpm/tpm_token_loader.h |
+++ b/chromeos/tpm/tpm_token_loader.h |
@@ -66,6 +66,12 @@ class CHROMEOS_EXPORT TPMTokenLoader : public LoginState::Observer { |
void SetCryptoTaskRunner( |
const scoped_refptr<base::SequencedTaskRunner>& crypto_task_runner); |
+ // Starts loading TPM system token, if not yet started. It should be called |
+ // if the system token has to be loaded before a user logs in. By default (if |
+ // |EnsureStarted| is not called) system token loading will start when the |
+ // login state changes to LOGGED_IN_ACTIVE. |
+ void EnsureStarted(); |
+ |
// Checks if the TPM token is enabled. If the state is unknown, |callback| |
// will be called back once the TPM state is known. |
TPMTokenStatus IsTPMTokenEnabled(const TPMReadyCallback& callback); |
@@ -116,6 +122,10 @@ class CHROMEOS_EXPORT TPMTokenLoader : public LoginState::Observer { |
int tpm_token_slot_id_; |
std::string tpm_user_pin_; |
+ // Whether TPM system token loading may be started before user log in. |
+ // This will be true iff |EnsureStarted| was called. |
+ bool can_start_before_login_; |
+ |
base::ThreadChecker thread_checker_; |
// TaskRunner for crypto calls. |