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

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: Patch set 1 fixes. 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 is using Cr50. If a Cr50 is being used
62 // then a TPM is not being used.
63 static bool IsCr50Used();
64
61 ~TPMTokenInfoGetter(); 65 ~TPMTokenInfoGetter();
62 66
63 // Starts getting TPM token info. Should be called at most once. 67 // Starts getting TPM token info. Should be called at most once.
64 // |callback| will be called when all the info is fetched. 68 // |callback| will be called when all the info is fetched.
65 // The object may get deleted before |callback| is called, which is equivalent 69 // 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 70 // to cancelling the info getting (in which case |callback| will never get
67 // called). 71 // called).
68 void Start(const TPMTokenInfoCallback& callback); 72 void Start(const TPMTokenInfoCallback& callback);
69 73
70 private: 74 private:
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 CryptohomeClient* cryptohome_client_; 126 CryptohomeClient* cryptohome_client_;
123 127
124 base::WeakPtrFactory<TPMTokenInfoGetter> weak_factory_; 128 base::WeakPtrFactory<TPMTokenInfoGetter> weak_factory_;
125 129
126 DISALLOW_COPY_AND_ASSIGN(TPMTokenInfoGetter); 130 DISALLOW_COPY_AND_ASSIGN(TPMTokenInfoGetter);
127 }; 131 };
128 132
129 } // namespace chromeos 133 } // namespace chromeos
130 134
131 #endif // CHROMEOS_TPM_TPM_TOKEN_INFO_GETTER_H_ 135 #endif // CHROMEOS_TPM_TPM_TOKEN_INFO_GETTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698