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

Side by Side Diff: tpm_init.h

Issue 3048029: Initial version of tpm_init, a library for taking ownership of the TPM. (Closed) Base URL: ssh://git@chromiumos-git/tpm_init.git
Patch Set: Minor fix to the error code check from TakeOwnership. Created 10 years, 4 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
« no previous file with comments | « tpm.cc ('k') | tpm_init.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // TpmInit - public interface class for initializing the TPM
6
7 #include <base/scoped_ptr.h>
8 #include <base/platform_thread.h>
9 #include <chromeos/utility.h>
10
11 #ifndef TPM_INIT_TPM_INIT_H_
12 #define TPM_INIT_TPM_INIT_H_
13
14 namespace tpm_init {
15
16 class TpmInitTask;
17
18 class TpmInit {
19 public:
20
21 // Default constructor
22 TpmInit();
23
24 virtual ~TpmInit();
25
26 // Starts asynchronous initialization of the TPM
27 virtual bool StartInitializeTpm();
28
29 // Returns true if the TPM is initialized and ready for use
30 virtual bool IsTpmReady();
31
32 // Returns true if the TPM is enabled
33 virtual bool IsTpmEnabled();
34
35 // Gets the TPM password if the TPM initialization took ownership
36 //
37 // Parameters
38 // password (OUT) - The owner password used for the TPM
39 virtual bool GetTpmPassword(chromeos::Blob* password);
40
41 // Returns the number of milliseconds it took to initialize the TPM
42 virtual long GetInitializationMillis();
43
44 private:
45 // The background task for initializing the TPM, implemented as a
46 // PlatformThread::Delegate
47 scoped_ptr<TpmInitTask> tpm_init_;
48
49 DISALLOW_COPY_AND_ASSIGN(TpmInit);
50 };
51
52 } // namespace tpm_init
53
54 #endif // TPM_INIT_TPM_INIT_H_
OLDNEW
« no previous file with comments | « tpm.cc ('k') | tpm_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698