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

Side by Side Diff: chromeos/dbus/cryptohome_client.h

Issue 26407002: Add support for the Pkcs11GetTpmTokenInfoForUser cryptohome call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_DBUS_CRYPTOHOME_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_
6 #define CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ 6 #define CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 21 matching lines...) Expand all
32 typedef base::Callback<void(int async_id, 32 typedef base::Callback<void(int async_id,
33 bool return_status, 33 bool return_status,
34 const std::string& data)> 34 const std::string& data)>
35 AsyncCallStatusWithDataHandler; 35 AsyncCallStatusWithDataHandler;
36 // A callback to handle responses of AsyncXXX methods. 36 // A callback to handle responses of AsyncXXX methods.
37 typedef base::Callback<void(int async_id)> AsyncMethodCallback; 37 typedef base::Callback<void(int async_id)> AsyncMethodCallback;
38 // A callback to handle responses of Pkcs11GetTpmTokenInfo method. 38 // A callback to handle responses of Pkcs11GetTpmTokenInfo method.
39 typedef base::Callback<void( 39 typedef base::Callback<void(
40 DBusMethodCallStatus call_status, 40 DBusMethodCallStatus call_status,
41 const std::string& label, 41 const std::string& label,
42 const std::string& user_pin)> Pkcs11GetTpmTokenInfoCallback; 42 const std::string& user_pin,
43 int slot)> Pkcs11GetTpmTokenInfoCallback;
satorux1 2013/10/08 04:29:33 What is slot? could you add some comments about la
Darren Krahn 2013/10/08 17:06:41 Done.
43 // A callback for methods which return both a bool result and data. 44 // A callback for methods which return both a bool result and data.
44 typedef base::Callback<void(DBusMethodCallStatus call_status, 45 typedef base::Callback<void(DBusMethodCallStatus call_status,
45 bool result, 46 bool result,
46 const std::string& data)> DataMethodCallback; 47 const std::string& data)> DataMethodCallback;
47 48
48 virtual ~CryptohomeClient(); 49 virtual ~CryptohomeClient();
49 50
50 // Factory function, creates a new instance and returns ownership. 51 // Factory function, creates a new instance and returns ownership.
51 // For normal usage, access the singleton via DBusThreadManager::Get(). 52 // For normal usage, access the singleton via DBusThreadManager::Get().
52 static CryptohomeClient* Create(DBusClientImplementationType type); 53 static CryptohomeClient* Create(DBusClientImplementationType type);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 virtual bool CallTpmClearStoredPasswordAndBlock() = 0; 184 virtual bool CallTpmClearStoredPasswordAndBlock() = 0;
184 185
185 // Calls Pkcs11IsTpmTokenReady method. 186 // Calls Pkcs11IsTpmTokenReady method.
186 virtual void Pkcs11IsTpmTokenReady( 187 virtual void Pkcs11IsTpmTokenReady(
187 const BoolDBusMethodCallback& callback) = 0; 188 const BoolDBusMethodCallback& callback) = 0;
188 189
189 // Calls Pkcs11GetTpmTokenInfo method. 190 // Calls Pkcs11GetTpmTokenInfo method.
190 virtual void Pkcs11GetTpmTokenInfo( 191 virtual void Pkcs11GetTpmTokenInfo(
191 const Pkcs11GetTpmTokenInfoCallback& callback) = 0; 192 const Pkcs11GetTpmTokenInfoCallback& callback) = 0;
192 193
194 virtual void Pkcs11GetTpmTokenInfoForUser(
satorux1 2013/10/08 04:29:33 Function comment is missing. "Calls XXX method."
Darren Krahn 2013/10/08 17:06:41 Done.
195 const std::string& username,
196 const Pkcs11GetTpmTokenInfoCallback& callback) = 0;
197
193 // Calls InstallAttributesGet method and returns true when the call succeeds. 198 // Calls InstallAttributesGet method and returns true when the call succeeds.
194 // This method blocks until the call returns. 199 // This method blocks until the call returns.
195 // The original content of |value| is lost. 200 // The original content of |value| is lost.
196 virtual bool InstallAttributesGet(const std::string& name, 201 virtual bool InstallAttributesGet(const std::string& name,
197 std::vector<uint8>* value, 202 std::vector<uint8>* value,
198 bool* successful) = 0; 203 bool* successful) = 0;
199 204
200 // Calls InstallAttributesSet method and returns true when the call succeeds. 205 // Calls InstallAttributesSet method and returns true when the call succeeds.
201 // This method blocks until the call returns. 206 // This method blocks until the call returns.
202 virtual bool InstallAttributesSet(const std::string& name, 207 virtual bool InstallAttributesSet(const std::string& name,
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 // Create() should be used instead. 362 // Create() should be used instead.
358 CryptohomeClient(); 363 CryptohomeClient();
359 364
360 private: 365 private:
361 DISALLOW_COPY_AND_ASSIGN(CryptohomeClient); 366 DISALLOW_COPY_AND_ASSIGN(CryptohomeClient);
362 }; 367 };
363 368
364 } // namespace chromeos 369 } // namespace chromeos
365 370
366 #endif // CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ 371 #endif // CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698