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

Side by Side Diff: chromeos/tpm/tpm_token_info_getter.h

Issue 2856683002: cros: Replace "TPM" with "secure module" for machines without TPM. (Closed)
Patch Set: Created 3 years, 7 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
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_TPM_TOKEN_INFO_GETTER_H_ 5 #ifndef CHROMEOS_TPM_TPM_TOKEN_INFO_GETTER_H_
6 #define CHROMEOS_TPM_TPM_TOKEN_INFO_GETTER_H_ 6 #define CHROMEOS_TPM_TPM_TOKEN_INFO_GETTER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 static std::unique_ptr<TPMTokenInfoGetter> CreateForUserToken( 51 static std::unique_ptr<TPMTokenInfoGetter> CreateForUserToken(
52 const AccountId& account_id, 52 const AccountId& account_id,
53 CryptohomeClient* cryptohome_client, 53 CryptohomeClient* cryptohome_client,
54 const scoped_refptr<base::TaskRunner>& delayed_task_runner); 54 const scoped_refptr<base::TaskRunner>& delayed_task_runner);
55 55
56 // Factory method for TPMTokenGetter for the system token. 56 // Factory method for TPMTokenGetter for the system token.
57 static std::unique_ptr<TPMTokenInfoGetter> CreateForSystemToken( 57 static std::unique_ptr<TPMTokenInfoGetter> CreateForSystemToken(
58 CryptohomeClient* cryptohome_client, 58 CryptohomeClient* cryptohome_client,
59 const scoped_refptr<base::TaskRunner>& delayed_task_runner); 59 const scoped_refptr<base::TaskRunner>& delayed_task_runner);
60 60
61 // Method to figure out if this machine has a TPM.
62 static bool DoesTPMExist();
63
61 ~TPMTokenInfoGetter(); 64 ~TPMTokenInfoGetter();
62 65
63 // Starts getting TPM token info. Should be called at most once. 66 // Starts getting TPM token info. Should be called at most once.
64 // |callback| will be called when all the info is fetched. 67 // |callback| will be called when all the info is fetched.
65 // The object may get deleted before |callback| is called, which is equivalent 68 // The object may get deleted before |callback| is called, which is equivalent
66 // to cancelling the info getting (in which case |callback| will never get 69 // to cancelling the info getting (in which case |callback| will never get
67 // called). 70 // called).
68 void Start(const TPMTokenInfoCallback& callback); 71 void Start(const TPMTokenInfoCallback& callback);
69 72
70 private: 73 private:
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 CryptohomeClient* cryptohome_client_; 125 CryptohomeClient* cryptohome_client_;
123 126
124 base::WeakPtrFactory<TPMTokenInfoGetter> weak_factory_; 127 base::WeakPtrFactory<TPMTokenInfoGetter> weak_factory_;
125 128
126 DISALLOW_COPY_AND_ASSIGN(TPMTokenInfoGetter); 129 DISALLOW_COPY_AND_ASSIGN(TPMTokenInfoGetter);
127 }; 130 };
128 131
129 } // namespace chromeos 132 } // namespace chromeos
130 133
131 #endif // CHROMEOS_TPM_TPM_TOKEN_INFO_GETTER_H_ 134 #endif // CHROMEOS_TPM_TPM_TOKEN_INFO_GETTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698