OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/fake_cryptohome_client.h" | 5 #include "chromeos/dbus/fake_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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
578 } | 578 } |
579 | 579 |
580 void FakeCryptohomeClient::MigrateToDircrypto( | 580 void FakeCryptohomeClient::MigrateToDircrypto( |
581 const cryptohome::Identification& cryptohome_id, | 581 const cryptohome::Identification& cryptohome_id, |
582 const cryptohome::AuthorizationRequest& auth, | 582 const cryptohome::AuthorizationRequest& auth, |
583 const VoidDBusMethodCallback& callback) { | 583 const VoidDBusMethodCallback& callback) { |
584 base::ThreadTaskRunnerHandle::Get()->PostTask( | 584 base::ThreadTaskRunnerHandle::Get()->PostTask( |
585 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS)); | 585 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS)); |
586 } | 586 } |
587 | 587 |
588 void FakeCryptohomeClient::RemoveFirmwareManagementParametersFromTpm( | |
589 const cryptohome::RemoveFirmwareManagementParametersRequest& request, | |
590 const ProtobufMethodCallback& callback) { | |
591 cryptohome::BaseReply reply; | |
Daniel Erat
2017/03/29 16:50:08
nit: if you're not planning to set things in the r
igorcov
2017/03/29 17:08:26
Done.
| |
592 ReturnProtobufMethodCallback(reply, callback); | |
593 } | |
594 | |
595 void FakeCryptohomeClient::SetFirmwareManagementParametersInTpm( | |
596 const cryptohome::SetFirmwareManagementParametersRequest& request, | |
597 const ProtobufMethodCallback& callback) { | |
598 cryptohome::BaseReply reply; | |
Daniel Erat
2017/03/29 16:50:08
nit: same here
igorcov
2017/03/29 17:08:26
Done.
| |
599 ReturnProtobufMethodCallback(reply, callback); | |
600 } | |
601 | |
588 void FakeCryptohomeClient::SetServiceIsAvailable(bool is_available) { | 602 void FakeCryptohomeClient::SetServiceIsAvailable(bool is_available) { |
589 service_is_available_ = is_available; | 603 service_is_available_ = is_available; |
590 if (is_available) { | 604 if (is_available) { |
591 std::vector<WaitForServiceToBeAvailableCallback> callbacks; | 605 std::vector<WaitForServiceToBeAvailableCallback> callbacks; |
592 callbacks.swap(pending_wait_for_service_to_be_available_callbacks_); | 606 callbacks.swap(pending_wait_for_service_to_be_available_callbacks_); |
593 for (size_t i = 0; i < callbacks.size(); ++i) | 607 for (size_t i = 0; i < callbacks.size(); ++i) |
594 callbacks[i].Run(is_available); | 608 callbacks[i].Run(is_available); |
595 } | 609 } |
596 } | 610 } |
597 | 611 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
643 callback.Run(async_call_id_); | 657 callback.Run(async_call_id_); |
644 if (!async_call_status_data_handler_.is_null()) { | 658 if (!async_call_status_data_handler_.is_null()) { |
645 base::ThreadTaskRunnerHandle::Get()->PostTask( | 659 base::ThreadTaskRunnerHandle::Get()->PostTask( |
646 FROM_HERE, base::Bind(async_call_status_data_handler_, async_call_id_, | 660 FROM_HERE, base::Bind(async_call_status_data_handler_, async_call_id_, |
647 true, data)); | 661 true, data)); |
648 } | 662 } |
649 ++async_call_id_; | 663 ++async_call_id_; |
650 } | 664 } |
651 | 665 |
652 } // namespace chromeos | 666 } // namespace chromeos |
OLD | NEW |