| Index: chrome/browser/chromeos/login/user_manager.cc
|
| diff --git a/chrome/browser/chromeos/login/user_manager.cc b/chrome/browser/chromeos/login/user_manager.cc
|
| index e4c7390408ccb4fbafea4bc505e89222a9a8778e..9040f0b8dae254ce4e45614f3befcaff4b76178a 100644
|
| --- a/chrome/browser/chromeos/login/user_manager.cc
|
| +++ b/chrome/browser/chromeos/login/user_manager.cc
|
| @@ -238,15 +238,15 @@ bool RealTPMTokenInfoDelegate::IsTokenAvailable() const {
|
| }
|
|
|
| bool RealTPMTokenInfoDelegate::IsTokenReady() const {
|
| + if (token_ready_)
|
| + return true;
|
| CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| - if (!token_ready_) {
|
| - // Retrieve token_name_ and user_pin_ here since they will never change
|
| - // and CryptohomeLibrary calls are not thread safe.
|
| - if (CrosLibrary::Get()->GetCryptohomeLibrary()->Pkcs11IsTpmTokenReady()) {
|
| - CrosLibrary::Get()->GetCryptohomeLibrary()->Pkcs11GetTpmTokenInfo(
|
| - &token_name_, &user_pin_);
|
| - token_ready_ = true;
|
| - }
|
| + // Retrieve token_name_ and user_pin_ here since they will never change
|
| + // and CryptohomeLibrary calls are not thread safe.
|
| + if (CrosLibrary::Get()->GetCryptohomeLibrary()->Pkcs11IsTpmTokenReady()) {
|
| + CrosLibrary::Get()->GetCryptohomeLibrary()->Pkcs11GetTpmTokenInfo(
|
| + &token_name_, &user_pin_);
|
| + token_ready_ = true;
|
| }
|
| return token_ready_;
|
| }
|
|
|