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