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

Unified Diff: chromeos/dbus/cryptohome_client.h

Issue 10830033: Convert chromeos::CryptohomeClient::TpmCanAttemptOwnership to asynchronous (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/dbus/cryptohome_client.h
diff --git a/chromeos/dbus/cryptohome_client.h b/chromeos/dbus/cryptohome_client.h
index 2d619dab151279de99ed9f230eb88200eee5e8dc..c79e206686f55169859c40bf157f14cc5404ca56 100644
--- a/chromeos/dbus/cryptohome_client.h
+++ b/chromeos/dbus/cryptohome_client.h
@@ -30,6 +30,9 @@ class CHROMEOS_EXPORT CryptohomeClient {
> AsyncCallStatusHandler;
// A callback to handle responses of AsyncXXX methods.
typedef base::Callback<void(int async_id)> AsyncMethodCallback;
+ // A callback to handle responses of methods without result values.
+ typedef base::Callback<void(
+ DBusMethodCallStatus call_status)> VoidMethodCallback;
stevenjb 2012/07/26 17:19:52 This and the two callbacks below seem generic enou
hashimoto 2012/07/27 04:37:18 Sounds good, will do in a separate patch.
// A callback to handle responses of methods returning a bool value.
typedef base::Callback<void(DBusMethodCallStatus call_status,
bool result)> BoolMethodCallback;
@@ -122,9 +125,8 @@ class CHROMEOS_EXPORT CryptohomeClient {
// This method blocks until the call returns.
virtual bool TpmIsBeingOwned(bool* owning) = 0;
- // Calls TpmCanAttemptOwnership method and returns true when the call
- // succeeds. This method blocks until the call returns.
- virtual bool TpmCanAttemptOwnership() = 0;
+ // Calls TpmCanAttemptOwnership method.
+ virtual void TpmCanAttemptOwnership(const VoidMethodCallback& callback) = 0;
stevenjb 2012/07/26 17:19:52 I'm confused about what this method does. It looks
hashimoto 2012/07/27 04:37:18 Looks like your latter guess is correct. (http://g
stevenjb 2012/07/30 22:24:38 OK, I see. That is definitely badly named. Can you
hashimoto 2012/07/31 02:27:34 Added a comment.
// Calls TpmClearStoredPassword method and returns true when the call
// succeeds. This method blocks until the call returns.

Powered by Google App Engine
This is Rietveld 408576698