Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: chromeos/tpm_token_loader.h

Issue 741593002: If easy sign-in is set up, allow TPMTokenLoader to start before login (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698