| OLD | NEW |
| 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 #include "chromeos/dbus/cryptohome_client.h" | 5 #include "chromeos/dbus/cryptohome_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 80 } |
| 81 | 81 |
| 82 // CryptohomeClient override. | 82 // CryptohomeClient override. |
| 83 void IsMounted(const BoolDBusMethodCallback& callback) override { | 83 void IsMounted(const BoolDBusMethodCallback& callback) override { |
| 84 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, | 84 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, |
| 85 cryptohome::kCryptohomeIsMounted); | 85 cryptohome::kCryptohomeIsMounted); |
| 86 CallBoolMethod(&method_call, callback); | 86 CallBoolMethod(&method_call, callback); |
| 87 } | 87 } |
| 88 | 88 |
| 89 // CryptohomeClient override. | 89 // CryptohomeClient override. |
| 90 bool Unmount(bool* success) override { | 90 void Unmount(const BoolDBusMethodCallback& callback) override { |
| 91 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, | 91 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, |
| 92 cryptohome::kCryptohomeUnmount); | 92 cryptohome::kCryptohomeUnmount); |
| 93 return CallBoolMethodAndBlock(&method_call, success); | 93 CallBoolMethod(&method_call, callback); |
| 94 } | 94 } |
| 95 | 95 |
| 96 // CryptohomeClient override. | 96 // CryptohomeClient override. |
| 97 void AsyncCheckKey(const cryptohome::Identification& cryptohome_id, | 97 void AsyncCheckKey(const cryptohome::Identification& cryptohome_id, |
| 98 const std::string& key, | 98 const std::string& key, |
| 99 const AsyncMethodCallback& callback) override { | 99 const AsyncMethodCallback& callback) override { |
| 100 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, | 100 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, |
| 101 cryptohome::kCryptohomeAsyncCheckKey); | 101 cryptohome::kCryptohomeAsyncCheckKey); |
| 102 dbus::MessageWriter writer(&method_call); | 102 dbus::MessageWriter writer(&method_call); |
| 103 writer.AppendString(cryptohome_id.id()); | 103 writer.AppendString(cryptohome_id.id()); |
| (...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1274 return new CryptohomeClientImpl(); | 1274 return new CryptohomeClientImpl(); |
| 1275 } | 1275 } |
| 1276 | 1276 |
| 1277 // static | 1277 // static |
| 1278 std::string CryptohomeClient::GetStubSanitizedUsername( | 1278 std::string CryptohomeClient::GetStubSanitizedUsername( |
| 1279 const cryptohome::Identification& cryptohome_id) { | 1279 const cryptohome::Identification& cryptohome_id) { |
| 1280 return cryptohome_id.id() + kUserIdStubHashSuffix; | 1280 return cryptohome_id.id() + kUserIdStubHashSuffix; |
| 1281 } | 1281 } |
| 1282 | 1282 |
| 1283 } // namespace chromeos | 1283 } // namespace chromeos |
| OLD | NEW |