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

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

Issue 2797163002: cryptohome: Make CryptohomeClient::Unmount non-blocking (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « chromeos/dbus/cryptohome_client.h ('k') | chromeos/dbus/fake_cryptohome_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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
OLDNEW
« no previous file with comments | « chromeos/dbus/cryptohome_client.h ('k') | chromeos/dbus/fake_cryptohome_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698