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

Side by Side Diff: chromeos/dbus/fake_update_engine_client.cc

Issue 216883004: Browsertests for improved reset options: powerwash and rollback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Const issue. Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/dbus/fake_update_engine_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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),
11 reboot_after_update_call_count_(0) { 11 can_rollback_stub_result_(false),
12 reboot_after_update_call_count_(0),
13 rollback_call_count_(0),
14 can_rollback_call_count_(0) {
12 } 15 }
13 16
14 FakeUpdateEngineClient::~FakeUpdateEngineClient() { 17 FakeUpdateEngineClient::~FakeUpdateEngineClient() {
15 } 18 }
16 19
17 void FakeUpdateEngineClient::Init(dbus::Bus* bus) { 20 void FakeUpdateEngineClient::Init(dbus::Bus* bus) {
18 } 21 }
19 22
20 void FakeUpdateEngineClient::AddObserver(Observer* observer) { 23 void FakeUpdateEngineClient::AddObserver(Observer* observer) {
21 } 24 }
22 25
23 void FakeUpdateEngineClient::RemoveObserver(Observer* observer) { 26 void FakeUpdateEngineClient::RemoveObserver(Observer* observer) {
24 } 27 }
25 28
26 bool FakeUpdateEngineClient::HasObserver(Observer* observer) { 29 bool FakeUpdateEngineClient::HasObserver(Observer* observer) {
27 return false; 30 return false;
28 } 31 }
29 32
30 void FakeUpdateEngineClient::RequestUpdateCheck( 33 void FakeUpdateEngineClient::RequestUpdateCheck(
31 const UpdateCheckCallback& callback) { 34 const UpdateCheckCallback& callback) {
32 callback.Run(update_check_result_); 35 callback.Run(update_check_result_);
33 } 36 }
34 37
35 void FakeUpdateEngineClient::Rollback() { 38 void FakeUpdateEngineClient::Rollback() {
39 rollback_call_count_++;
36 } 40 }
37 41
38 void FakeUpdateEngineClient::CanRollbackCheck( 42 void FakeUpdateEngineClient::CanRollbackCheck(
39 const RollbackCheckCallback& callback) { 43 const RollbackCheckCallback& callback) {
44 can_rollback_call_count_++;
45 callback.Run(can_rollback_stub_result_);
40 } 46 }
41 47
42 void FakeUpdateEngineClient::RebootAfterUpdate() { 48 void FakeUpdateEngineClient::RebootAfterUpdate() {
43 reboot_after_update_call_count_++; 49 reboot_after_update_call_count_++;
44 } 50 }
45 51
46 UpdateEngineClient::Status FakeUpdateEngineClient::GetLastStatus() { 52 UpdateEngineClient::Status FakeUpdateEngineClient::GetLastStatus() {
47 if (status_queue_.empty()) 53 if (status_queue_.empty())
48 return default_status_; 54 return default_status_;
49 55
(...skipping 14 matching lines...) Expand all
64 const UpdateEngineClient::Status& status) { 70 const UpdateEngineClient::Status& status) {
65 default_status_ = status; 71 default_status_ = status;
66 } 72 }
67 73
68 void FakeUpdateEngineClient::set_update_check_result( 74 void FakeUpdateEngineClient::set_update_check_result(
69 const UpdateEngineClient::UpdateCheckResult& result) { 75 const UpdateEngineClient::UpdateCheckResult& result) {
70 update_check_result_ = result; 76 update_check_result_ = result;
71 } 77 }
72 78
73 } // namespace chromeos 79 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_update_engine_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698