Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: chromeos/dbus/fake_update_engine_client.cc

Issue 2081873002: Incorporate comments in Dbus code and add Eol icon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698