| 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/fake_update_engine_client.h" | 5 #include "chromeos/dbus/fake_update_engine_client.h" |
| 6 | 6 |
| 7 namespace chromeos { | 7 namespace chromeos { |
| 8 | 8 |
| 9 FakeUpdateEngineClient::FakeUpdateEngineClient() | 9 FakeUpdateEngineClient::FakeUpdateEngineClient() |
| 10 : update_check_result_(UpdateEngineClient::UPDATE_RESULT_SUCCESS), | 10 : update_check_result_(UpdateEngineClient::UPDATE_RESULT_SUCCESS), |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 void FakeUpdateEngineClient::RequestUpdateCheck( | 27 void FakeUpdateEngineClient::RequestUpdateCheck( |
| 28 const UpdateCheckCallback& callback) { | 28 const UpdateCheckCallback& callback) { |
| 29 callback.Run(update_check_result_); | 29 callback.Run(update_check_result_); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void FakeUpdateEngineClient::RebootAfterUpdate() { | 32 void FakeUpdateEngineClient::RebootAfterUpdate() { |
| 33 reboot_after_update_call_count_++; | 33 reboot_after_update_call_count_++; |
| 34 } | 34 } |
| 35 | 35 |
| 36 void FakeUpdateEngineClient::SetReleaseTrack(const std::string& track) { | |
| 37 } | |
| 38 | |
| 39 void FakeUpdateEngineClient::GetReleaseTrack( | |
| 40 const GetReleaseTrackCallback& callback) { | |
| 41 } | |
| 42 | |
| 43 UpdateEngineClient::Status FakeUpdateEngineClient::GetLastStatus() { | 36 UpdateEngineClient::Status FakeUpdateEngineClient::GetLastStatus() { |
| 44 if (status_queue_.empty()) | 37 if (status_queue_.empty()) |
| 45 return default_status_; | 38 return default_status_; |
| 46 | 39 |
| 47 UpdateEngineClient::Status last_status = status_queue_.front(); | 40 UpdateEngineClient::Status last_status = status_queue_.front(); |
| 48 status_queue_.pop(); | 41 status_queue_.pop(); |
| 49 return last_status; | 42 return last_status; |
| 50 } | 43 } |
| 51 | 44 |
| 52 void FakeUpdateEngineClient::SetChannel(const std::string& target_channel, | 45 void FakeUpdateEngineClient::SetChannel(const std::string& target_channel, |
| 53 bool is_powerwash_allowed) { | 46 bool is_powerwash_allowed) { |
| 54 } | 47 } |
| 55 | 48 |
| 56 void FakeUpdateEngineClient::GetChannel(bool get_current_channel, | 49 void FakeUpdateEngineClient::GetChannel(bool get_current_channel, |
| 57 const GetChannelCallback& callback) { | 50 const GetChannelCallback& callback) { |
| 58 } | 51 } |
| 59 | 52 |
| 60 void FakeUpdateEngineClient::set_default_status( | 53 void FakeUpdateEngineClient::set_default_status( |
| 61 const UpdateEngineClient::Status& status) { | 54 const UpdateEngineClient::Status& status) { |
| 62 default_status_ = status; | 55 default_status_ = status; |
| 63 } | 56 } |
| 64 | 57 |
| 65 void FakeUpdateEngineClient::set_update_check_result( | 58 void FakeUpdateEngineClient::set_update_check_result( |
| 66 const UpdateEngineClient::UpdateCheckResult& result) { | 59 const UpdateEngineClient::UpdateCheckResult& result) { |
| 67 update_check_result_ = result; | 60 update_check_result_ = result; |
| 68 } | 61 } |
| 69 | 62 |
| 70 } // namespace chromeos | 63 } // namespace chromeos |
| OLD | NEW |