| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 async_call_status_data_handler_ = data_handler; | 38 async_call_status_data_handler_ = data_handler; |
| 39 } | 39 } |
| 40 | 40 |
| 41 // CryptohomeClient override. | 41 // CryptohomeClient override. |
| 42 virtual void ResetAsyncCallStatusHandlers() OVERRIDE { | 42 virtual void ResetAsyncCallStatusHandlers() OVERRIDE { |
| 43 async_call_status_handler_.Reset(); | 43 async_call_status_handler_.Reset(); |
| 44 async_call_status_data_handler_.Reset(); | 44 async_call_status_data_handler_.Reset(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 // CryptohomeClient override. | 47 // CryptohomeClient override. |
| 48 virtual void WaitForServiceToBeAvailable( |
| 49 const WaitForServiceToBeAvailableCallback& callback) OVERRIDE { |
| 50 proxy_->WaitForServiceToBeAvailable(callback); |
| 51 } |
| 52 |
| 53 // CryptohomeClient override. |
| 48 virtual void IsMounted(const BoolDBusMethodCallback& callback) OVERRIDE { | 54 virtual void IsMounted(const BoolDBusMethodCallback& callback) OVERRIDE { |
| 49 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, | 55 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, |
| 50 cryptohome::kCryptohomeIsMounted); | 56 cryptohome::kCryptohomeIsMounted); |
| 51 CallBoolMethod(&method_call, callback); | 57 CallBoolMethod(&method_call, callback); |
| 52 } | 58 } |
| 53 | 59 |
| 54 // CryptohomeClient override. | 60 // CryptohomeClient override. |
| 55 virtual bool Unmount(bool *success) OVERRIDE { | 61 virtual bool Unmount(bool *success) OVERRIDE { |
| 56 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, | 62 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, |
| 57 cryptohome::kCryptohomeUnmount); | 63 cryptohome::kCryptohomeUnmount); |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 return new FakeCryptohomeClient(); | 925 return new FakeCryptohomeClient(); |
| 920 } | 926 } |
| 921 | 927 |
| 922 // static | 928 // static |
| 923 std::string CryptohomeClient::GetStubSanitizedUsername( | 929 std::string CryptohomeClient::GetStubSanitizedUsername( |
| 924 const std::string& username) { | 930 const std::string& username) { |
| 925 return username + kUserIdStubHashSuffix; | 931 return username + kUserIdStubHashSuffix; |
| 926 } | 932 } |
| 927 | 933 |
| 928 } // namespace chromeos | 934 } // namespace chromeos |
| OLD | NEW |