Index: chromeos/dbus/cryptohome_client.cc |
diff --git a/chromeos/dbus/cryptohome_client.cc b/chromeos/dbus/cryptohome_client.cc |
index 4ccb11646dbd7567edada63528f285843f67901e..230d8d432f9e705844a727255f4507cd26679364 100644 |
--- a/chromeos/dbus/cryptohome_client.cc |
+++ b/chromeos/dbus/cryptohome_client.cc |
@@ -20,6 +20,8 @@ |
namespace chromeos { |
+const int kCryptohomeNotReadyAsyncId = -1; |
+ |
namespace { |
// This suffix is appended to user_id to get hash in stub implementation: |
@@ -882,8 +884,10 @@ class CryptohomeClientImpl : public CryptohomeClient { |
// Handles the result of AsyncXXX methods. |
void OnAsyncMethodCall(const AsyncMethodCallback& callback, |
dbus::Response* response) { |
- if (!response) |
+ if (!response) { |
+ callback.Run(kCryptohomeNotReadyAsyncId); |
return; |
+ } |
dbus::MessageReader reader(response); |
int async_id = 0; |
if (!reader.PopInt32(&async_id)) { |