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 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
913 | 913 |
914 void FlushAndSignBootAttributes( | 914 void FlushAndSignBootAttributes( |
915 const cryptohome::FlushAndSignBootAttributesRequest& request, | 915 const cryptohome::FlushAndSignBootAttributesRequest& request, |
916 const ProtobufMethodCallback& callback) override { | 916 const ProtobufMethodCallback& callback) override { |
917 const char* method_name = cryptohome::kCryptohomeFlushAndSignBootAttributes; | 917 const char* method_name = cryptohome::kCryptohomeFlushAndSignBootAttributes; |
918 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, method_name); | 918 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, method_name); |
919 | 919 |
920 dbus::MessageWriter writer(&method_call); | 920 dbus::MessageWriter writer(&method_call); |
921 writer.AppendProtoAsArrayOfBytes(request); | 921 writer.AppendProtoAsArrayOfBytes(request); |
922 | 922 |
923 proxy_->CallMethod(&method_call, kTpmDBusTimeoutMs, | |
924 base::Bind(&CryptohomeClientImpl::OnBaseReplyMethod, | |
925 weak_ptr_factory_.GetWeakPtr(), callback)); | |
926 } | |
927 | |
928 void AsyncTpmUpdateFirmwareManagementParameters( | |
929 const std::string& method_name, | |
930 const google::protobuf::MessageLite& request, | |
931 const ProtobufMethodCallback& callback) override { | |
932 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, method_name); | |
Daniel Erat
2017/03/06 21:18:26
it looks like a bunch of these methods are all cop
igorcov
2017/03/09 12:22:57
Done, thanks for suggestion.
| |
933 | |
934 dbus::MessageWriter writer(&method_call); | |
935 writer.AppendProtoAsArrayOfBytes(request); | |
936 | |
923 proxy_->CallMethod(&method_call, | 937 proxy_->CallMethod(&method_call, |
924 kTpmDBusTimeoutMs , | 938 kTpmDBusTimeoutMs , |
925 base::Bind(&CryptohomeClientImpl::OnBaseReplyMethod, | 939 base::Bind(&CryptohomeClientImpl::OnBaseReplyMethod, |
926 weak_ptr_factory_.GetWeakPtr(), | 940 weak_ptr_factory_.GetWeakPtr(), |
927 callback)); | 941 callback)); |
928 } | 942 } |
929 | 943 |
930 protected: | 944 protected: |
931 void Init(dbus::Bus* bus) override { | 945 void Init(dbus::Bus* bus) override { |
932 proxy_ = bus->GetObjectProxy( | 946 proxy_ = bus->GetObjectProxy( |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1222 return new CryptohomeClientImpl(); | 1236 return new CryptohomeClientImpl(); |
1223 } | 1237 } |
1224 | 1238 |
1225 // static | 1239 // static |
1226 std::string CryptohomeClient::GetStubSanitizedUsername( | 1240 std::string CryptohomeClient::GetStubSanitizedUsername( |
1227 const cryptohome::Identification& cryptohome_id) { | 1241 const cryptohome::Identification& cryptohome_id) { |
1228 return cryptohome_id.id() + kUserIdStubHashSuffix; | 1242 return cryptohome_id.id() + kUserIdStubHashSuffix; |
1229 } | 1243 } |
1230 | 1244 |
1231 } // namespace chromeos | 1245 } // namespace chromeos |
OLD | NEW |