Index: chromeos/tpm_token_loader.h |
diff --git a/chromeos/tpm_token_loader.h b/chromeos/tpm_token_loader.h |
index bf6b3e366d16b5f38138b110faa40754b881c9f6..371cca0ec05858d3254329ad4e9e431526a19613 100644 |
--- a/chromeos/tpm_token_loader.h |
+++ b/chromeos/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 |Start| was called. |
+ bool can_start_before_login_; |
+ |
base::ThreadChecker thread_checker_; |
// TaskRunner for crypto calls. |