| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chromeos/tpm_token_loader.h" | 5 #include "chromeos/tpm_token_loader.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 } | 205 } |
| 206 case TPM_TOKEN_INITIALIZED: { | 206 case TPM_TOKEN_INITIALIZED: { |
| 207 NotifyTPMTokenReady(); | 207 NotifyTPMTokenReady(); |
| 208 return; | 208 return; |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 } | 211 } |
| 212 | 212 |
| 213 void TPMTokenLoader::RetryTokenInitializationLater() { | 213 void TPMTokenLoader::RetryTokenInitializationLater() { |
| 214 CHECK(thread_checker_.CalledOnValidThread()); | 214 CHECK(thread_checker_.CalledOnValidThread()); |
| 215 LOG(WARNING) << "Retry token initialization later."; | 215 VLOG(1) << "Retry token initialization later."; |
| 216 base::MessageLoopProxy::current()->PostDelayedTask( | 216 base::MessageLoopProxy::current()->PostDelayedTask( |
| 217 FROM_HERE, | 217 FROM_HERE, |
| 218 base::Bind(&TPMTokenLoader::ContinueTokenInitialization, | 218 base::Bind(&TPMTokenLoader::ContinueTokenInitialization, |
| 219 weak_factory_.GetWeakPtr()), | 219 weak_factory_.GetWeakPtr()), |
| 220 tpm_request_delay_); | 220 tpm_request_delay_); |
| 221 tpm_request_delay_ = GetNextRequestDelayMs(tpm_request_delay_); | 221 tpm_request_delay_ = GetNextRequestDelayMs(tpm_request_delay_); |
| 222 } | 222 } |
| 223 | 223 |
| 224 void TPMTokenLoader::OnTPMTokenEnabledForNSS() { | 224 void TPMTokenLoader::OnTPMTokenEnabledForNSS() { |
| 225 VLOG(1) << "TPMTokenEnabledForNSS"; | 225 VLOG(1) << "TPMTokenEnabledForNSS"; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 void TPMTokenLoader::NotifyTPMTokenReady() { | 284 void TPMTokenLoader::NotifyTPMTokenReady() { |
| 285 FOR_EACH_OBSERVER(Observer, observers_, OnTPMTokenReady()); | 285 FOR_EACH_OBSERVER(Observer, observers_, OnTPMTokenReady()); |
| 286 } | 286 } |
| 287 | 287 |
| 288 void TPMTokenLoader::LoggedInStateChanged() { | 288 void TPMTokenLoader::LoggedInStateChanged() { |
| 289 VLOG(1) << "LoggedInStateChanged"; | 289 VLOG(1) << "LoggedInStateChanged"; |
| 290 MaybeStartTokenInitialization(); | 290 MaybeStartTokenInitialization(); |
| 291 } | 291 } |
| 292 | 292 |
| 293 } // namespace chromeos | 293 } // namespace chromeos |
| OLD | NEW |