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 ReturnProtobufMethodCallback(cryptohome::BaseReply(), callback); |
| 592 } |
| 593 |
| 594 void FakeCryptohomeClient::SetFirmwareManagementParametersInTpm( |
| 595 const cryptohome::SetFirmwareManagementParametersRequest& request, |
| 596 const ProtobufMethodCallback& callback) { |
| 597 ReturnProtobufMethodCallback(cryptohome::BaseReply(), callback); |
| 598 } |
| 599 |
588 void FakeCryptohomeClient::SetServiceIsAvailable(bool is_available) { | 600 void FakeCryptohomeClient::SetServiceIsAvailable(bool is_available) { |
589 service_is_available_ = is_available; | 601 service_is_available_ = is_available; |
590 if (is_available) { | 602 if (is_available) { |
591 std::vector<WaitForServiceToBeAvailableCallback> callbacks; | 603 std::vector<WaitForServiceToBeAvailableCallback> callbacks; |
592 callbacks.swap(pending_wait_for_service_to_be_available_callbacks_); | 604 callbacks.swap(pending_wait_for_service_to_be_available_callbacks_); |
593 for (size_t i = 0; i < callbacks.size(); ++i) | 605 for (size_t i = 0; i < callbacks.size(); ++i) |
594 callbacks[i].Run(is_available); | 606 callbacks[i].Run(is_available); |
595 } | 607 } |
596 } | 608 } |
597 | 609 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 callback.Run(async_call_id_); | 655 callback.Run(async_call_id_); |
644 if (!async_call_status_data_handler_.is_null()) { | 656 if (!async_call_status_data_handler_.is_null()) { |
645 base::ThreadTaskRunnerHandle::Get()->PostTask( | 657 base::ThreadTaskRunnerHandle::Get()->PostTask( |
646 FROM_HERE, base::Bind(async_call_status_data_handler_, async_call_id_, | 658 FROM_HERE, base::Bind(async_call_status_data_handler_, async_call_id_, |
647 true, data)); | 659 true, data)); |
648 } | 660 } |
649 ++async_call_id_; | 661 ++async_call_id_; |
650 } | 662 } |
651 | 663 |
652 } // namespace chromeos | 664 } // namespace chromeos |
OLD | NEW |