| 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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 ReturnProtobufMethodCallback(reply, callback); | 567 ReturnProtobufMethodCallback(reply, callback); |
| 568 } | 568 } |
| 569 | 569 |
| 570 void FakeCryptohomeClient::FlushAndSignBootAttributes( | 570 void FakeCryptohomeClient::FlushAndSignBootAttributes( |
| 571 const cryptohome::FlushAndSignBootAttributesRequest& request, | 571 const cryptohome::FlushAndSignBootAttributesRequest& request, |
| 572 const ProtobufMethodCallback& callback) { | 572 const ProtobufMethodCallback& callback) { |
| 573 cryptohome::BaseReply reply; | 573 cryptohome::BaseReply reply; |
| 574 ReturnProtobufMethodCallback(reply, callback); | 574 ReturnProtobufMethodCallback(reply, callback); |
| 575 } | 575 } |
| 576 | 576 |
| 577 void FakeCryptohomeClient::RemoveFirmwareManagementParametersInTpm( |
| 578 const cryptohome::RemoveFirmwareManagementParametersRequest& request, |
| 579 const ProtobufMethodCallback& callback) { |
| 580 cryptohome::BaseReply reply; |
| 581 ReturnProtobufMethodCallback(reply, callback); |
| 582 } |
| 583 |
| 584 void FakeCryptohomeClient::SetFirmwareManagementParametersInTpm( |
| 585 const cryptohome::SetFirmwareManagementParametersRequest& request, |
| 586 const ProtobufMethodCallback& callback) { |
| 587 cryptohome::BaseReply reply; |
| 588 ReturnProtobufMethodCallback(reply, callback); |
| 589 } |
| 590 |
| 577 void FakeCryptohomeClient::SetServiceIsAvailable(bool is_available) { | 591 void FakeCryptohomeClient::SetServiceIsAvailable(bool is_available) { |
| 578 service_is_available_ = is_available; | 592 service_is_available_ = is_available; |
| 579 if (is_available) { | 593 if (is_available) { |
| 580 std::vector<WaitForServiceToBeAvailableCallback> callbacks; | 594 std::vector<WaitForServiceToBeAvailableCallback> callbacks; |
| 581 callbacks.swap(pending_wait_for_service_to_be_available_callbacks_); | 595 callbacks.swap(pending_wait_for_service_to_be_available_callbacks_); |
| 582 for (size_t i = 0; i < callbacks.size(); ++i) | 596 for (size_t i = 0; i < callbacks.size(); ++i) |
| 583 callbacks[i].Run(is_available); | 597 callbacks[i].Run(is_available); |
| 584 } | 598 } |
| 585 } | 599 } |
| 586 | 600 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 callback.Run(async_call_id_); | 646 callback.Run(async_call_id_); |
| 633 if (!async_call_status_data_handler_.is_null()) { | 647 if (!async_call_status_data_handler_.is_null()) { |
| 634 base::ThreadTaskRunnerHandle::Get()->PostTask( | 648 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 635 FROM_HERE, base::Bind(async_call_status_data_handler_, async_call_id_, | 649 FROM_HERE, base::Bind(async_call_status_data_handler_, async_call_id_, |
| 636 true, data)); | 650 true, data)); |
| 637 } | 651 } |
| 638 ++async_call_id_; | 652 ++async_call_id_; |
| 639 } | 653 } |
| 640 | 654 |
| 641 } // namespace chromeos | 655 } // namespace chromeos |
| OLD | NEW |