Chromium Code Reviews| Index: chromeos/dbus/fake_update_engine_client.cc |
| diff --git a/chromeos/dbus/fake_update_engine_client.cc b/chromeos/dbus/fake_update_engine_client.cc |
| index 7add9236554455643f3fd87e2280b4b804c633fd..d4b88c5c8e5dfa0008ee38894046b85584bd376b 100644 |
| --- a/chromeos/dbus/fake_update_engine_client.cc |
| +++ b/chromeos/dbus/fake_update_engine_client.cc |
| @@ -4,6 +4,8 @@ |
| #include "chromeos/dbus/fake_update_engine_client.h" |
| +#include "base/bind.h" |
| + |
| namespace chromeos { |
| FakeUpdateEngineClient::FakeUpdateEngineClient() |
| @@ -12,8 +14,8 @@ FakeUpdateEngineClient::FakeUpdateEngineClient() |
| reboot_after_update_call_count_(0), |
| request_update_check_call_count_(0), |
| rollback_call_count_(0), |
| - can_rollback_call_count_(0) { |
| -} |
| + can_rollback_call_count_(0), |
| + weak_ptr_factory_(this) {} |
| FakeUpdateEngineClient::~FakeUpdateEngineClient() { |
| } |
| @@ -73,10 +75,15 @@ void FakeUpdateEngineClient::SetChannel(const std::string& target_channel, |
| void FakeUpdateEngineClient::GetChannel(bool get_current_channel, |
| const GetChannelCallback& callback) { |
| + base::Bind(&FakeUpdateEngineClient::OnGetChannel, |
|
hashimoto
2016/06/21 03:09:52
This line does nothing.
If you want to run the cal
xiaoyinh(OOO Sep 11-29)
2016/06/22 18:25:40
Thank you so much! Done.
|
| + weak_ptr_factory_.GetWeakPtr(), callback); |
| } |
| void FakeUpdateEngineClient::GetEolStatus( |
| - const GetEolStatusCallback& callback) {} |
| + const GetEolStatusCallback& callback) { |
| + base::Bind(&FakeUpdateEngineClient::OnGetEolStatus, |
|
hashimoto
2016/06/21 03:09:52
ditto.
xiaoyinh(OOO Sep 11-29)
2016/06/22 18:25:40
Done.
|
| + weak_ptr_factory_.GetWeakPtr(), callback); |
| +} |
| void FakeUpdateEngineClient::set_default_status( |
| const UpdateEngineClient::Status& status) { |