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

Side by Side 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 unified diff | Download patch
OLDNEW
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 #include "base/bind.h"
8
7 namespace chromeos { 9 namespace chromeos {
8 10
9 FakeUpdateEngineClient::FakeUpdateEngineClient() 11 FakeUpdateEngineClient::FakeUpdateEngineClient()
10 : update_check_result_(UpdateEngineClient::UPDATE_RESULT_SUCCESS), 12 : update_check_result_(UpdateEngineClient::UPDATE_RESULT_SUCCESS),
11 can_rollback_stub_result_(false), 13 can_rollback_stub_result_(false),
12 reboot_after_update_call_count_(0), 14 reboot_after_update_call_count_(0),
13 request_update_check_call_count_(0), 15 request_update_check_call_count_(0),
14 rollback_call_count_(0), 16 rollback_call_count_(0),
15 can_rollback_call_count_(0) { 17 can_rollback_call_count_(0),
16 } 18 weak_ptr_factory_(this) {}
17 19
18 FakeUpdateEngineClient::~FakeUpdateEngineClient() { 20 FakeUpdateEngineClient::~FakeUpdateEngineClient() {
19 } 21 }
20 22
21 void FakeUpdateEngineClient::Init(dbus::Bus* bus) { 23 void FakeUpdateEngineClient::Init(dbus::Bus* bus) {
22 } 24 }
23 25
24 void FakeUpdateEngineClient::AddObserver(Observer* observer) { 26 void FakeUpdateEngineClient::AddObserver(Observer* observer) {
25 observers_.AddObserver(observer); 27 observers_.AddObserver(observer);
26 } 28 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 const UpdateEngineClient::Status& status) { 68 const UpdateEngineClient::Status& status) {
67 FOR_EACH_OBSERVER(Observer, observers_, UpdateStatusChanged(status)); 69 FOR_EACH_OBSERVER(Observer, observers_, UpdateStatusChanged(status));
68 } 70 }
69 71
70 void FakeUpdateEngineClient::SetChannel(const std::string& target_channel, 72 void FakeUpdateEngineClient::SetChannel(const std::string& target_channel,
71 bool is_powerwash_allowed) { 73 bool is_powerwash_allowed) {
72 } 74 }
73 75
74 void FakeUpdateEngineClient::GetChannel(bool get_current_channel, 76 void FakeUpdateEngineClient::GetChannel(bool get_current_channel,
75 const GetChannelCallback& callback) { 77 const GetChannelCallback& callback) {
78 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.
79 weak_ptr_factory_.GetWeakPtr(), callback);
76 } 80 }
77 81
78 void FakeUpdateEngineClient::GetEolStatus( 82 void FakeUpdateEngineClient::GetEolStatus(
79 const GetEolStatusCallback& callback) {} 83 const GetEolStatusCallback& callback) {
84 base::Bind(&FakeUpdateEngineClient::OnGetEolStatus,
hashimoto 2016/06/21 03:09:52 ditto.
xiaoyinh(OOO Sep 11-29) 2016/06/22 18:25:40 Done.
85 weak_ptr_factory_.GetWeakPtr(), callback);
86 }
80 87
81 void FakeUpdateEngineClient::set_default_status( 88 void FakeUpdateEngineClient::set_default_status(
82 const UpdateEngineClient::Status& status) { 89 const UpdateEngineClient::Status& status) {
83 default_status_ = status; 90 default_status_ = status;
84 } 91 }
85 92
86 void FakeUpdateEngineClient::set_update_check_result( 93 void FakeUpdateEngineClient::set_update_check_result(
87 const UpdateEngineClient::UpdateCheckResult& result) { 94 const UpdateEngineClient::UpdateCheckResult& result) {
88 update_check_result_ = result; 95 update_check_result_ = result;
89 } 96 }
90 97
91 } // namespace chromeos 98 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698