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

Side by Side Diff: chromeos/tpm_token_loader.h

Issue 386593002: Update TPMTokenLoader class comment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reworded. Created 6 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "chromeos/chromeos_export.h" 16 #include "chromeos/chromeos_export.h"
17 #include "chromeos/dbus/dbus_method_call_status.h" 17 #include "chromeos/dbus/dbus_method_call_status.h"
18 #include "chromeos/login/login_state.h" 18 #include "chromeos/login/login_state.h"
19 19
20 namespace base { 20 namespace base {
21 class SequencedTaskRunner; 21 class SequencedTaskRunner;
22 } 22 }
23 23
24 namespace chromeos { 24 namespace chromeos {
25 25
26 // This class is responsible for loading the TPM token when the user logs 26 // This class is responsible for loading the TPM backed token for the system
27 // in. It is expected to be constructed on the UI thread and public methods 27 // slot when the user logs in. It is expected to be constructed on the UI thread
28 // should all be called from the UI thread. When the TPM token is loaded, 28 // and public methods should all be called from the UI thread.
29 // or if the TPM should stay disabled for the session, the observers are 29 // When the TPM token is loaded, or if the TPM should stay disabled for the
30 // notified using |OnTPMTokenReady|. 30 // session, the observers are notified using |OnTPMTokenReady|.
31 // Note: This currently initializes the token with the hard coded default id 0.
32 // See CryptohomeClient::OnPkcs11GetTpmTokenInfo.
31 class CHROMEOS_EXPORT TPMTokenLoader : public LoginState::Observer { 33 class CHROMEOS_EXPORT TPMTokenLoader : public LoginState::Observer {
32 public: 34 public:
33 class Observer { 35 class Observer {
34 public: 36 public:
35 // Called when the TPM token initialization is done or the case where TPM 37 // Called when the TPM token initialization is done or the case where TPM
36 // should stay disabled is detected (e.g. on guest login). 38 // should stay disabled is detected (e.g. on guest login).
37 virtual void OnTPMTokenReady() = 0; 39 virtual void OnTPMTokenReady() = 0;
38 40
39 protected: 41 protected:
40 virtual ~Observer() {} 42 virtual ~Observer() {}
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 scoped_refptr<base::SequencedTaskRunner> crypto_task_runner_; 137 scoped_refptr<base::SequencedTaskRunner> crypto_task_runner_;
136 138
137 base::WeakPtrFactory<TPMTokenLoader> weak_factory_; 139 base::WeakPtrFactory<TPMTokenLoader> weak_factory_;
138 140
139 DISALLOW_COPY_AND_ASSIGN(TPMTokenLoader); 141 DISALLOW_COPY_AND_ASSIGN(TPMTokenLoader);
140 }; 142 };
141 143
142 } // namespace chromeos 144 } // namespace chromeos
143 145
144 #endif // CHROMEOS_TPM_TOKEN_LOADER_H_ 146 #endif // CHROMEOS_TPM_TOKEN_LOADER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698