| 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 #ifndef CHROMEOS_TPM_TOKEN_LOADER_H_ | 5 #ifndef CHROMEOS_TPM_TOKEN_LOADER_H_ |
| 6 #define CHROMEOS_TPM_TOKEN_LOADER_H_ | 6 #define CHROMEOS_TPM_TOKEN_LOADER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 void OnTPMTokenInitialized(bool success); | 94 void OnTPMTokenInitialized(bool success); |
| 95 | 95 |
| 96 // If token initialization step fails (e.g. if tpm token is not yet ready) | 96 // If token initialization step fails (e.g. if tpm token is not yet ready) |
| 97 // schedules the initialization step retry attempt after a timeout. | 97 // schedules the initialization step retry attempt after a timeout. |
| 98 void RetryTokenInitializationLater(); | 98 void RetryTokenInitializationLater(); |
| 99 | 99 |
| 100 // Notifies observers that the TPM token is ready. | 100 // Notifies observers that the TPM token is ready. |
| 101 void NotifyTPMTokenReady(); | 101 void NotifyTPMTokenReady(); |
| 102 | 102 |
| 103 // LoginState::Observer | 103 // LoginState::Observer |
| 104 virtual void LoggedInStateChanged() OVERRIDE; | 104 virtual void LoggedInStateChanged() override; |
| 105 | 105 |
| 106 bool initialized_for_test_; | 106 bool initialized_for_test_; |
| 107 | 107 |
| 108 TPMReadyCallbackList tpm_ready_callback_list_; | 108 TPMReadyCallbackList tpm_ready_callback_list_; |
| 109 | 109 |
| 110 // The states are traversed in this order but some might get omitted or never | 110 // The states are traversed in this order but some might get omitted or never |
| 111 // be left. | 111 // be left. |
| 112 enum TPMTokenState { | 112 enum TPMTokenState { |
| 113 TPM_STATE_UNKNOWN, | 113 TPM_STATE_UNKNOWN, |
| 114 TPM_INITIALIZATION_STARTED, | 114 TPM_INITIALIZATION_STARTED, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 135 scoped_refptr<base::SequencedTaskRunner> crypto_task_runner_; | 135 scoped_refptr<base::SequencedTaskRunner> crypto_task_runner_; |
| 136 | 136 |
| 137 base::WeakPtrFactory<TPMTokenLoader> weak_factory_; | 137 base::WeakPtrFactory<TPMTokenLoader> weak_factory_; |
| 138 | 138 |
| 139 DISALLOW_COPY_AND_ASSIGN(TPMTokenLoader); | 139 DISALLOW_COPY_AND_ASSIGN(TPMTokenLoader); |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 } // namespace chromeos | 142 } // namespace chromeos |
| 143 | 143 |
| 144 #endif // CHROMEOS_TPM_TOKEN_LOADER_H_ | 144 #endif // CHROMEOS_TPM_TOKEN_LOADER_H_ |
| OLD | NEW |