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

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

Issue 216883004: Browsertests for improved reset options: powerwash and rollback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: FakeUpdateEngine style fixes. 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 | « chrome/chrome_tests.gypi ('k') | chromeos/dbus/fake_update_engine_client.cc » ('j') | 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 #ifndef CHROMEOS_DBUS_FAKE_UPDATE_ENGINE_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_FAKE_UPDATE_ENGINE_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_UPDATE_ENGINE_CLIENT_H_ 6 #define CHROMEOS_DBUS_FAKE_UPDATE_ENGINE_CLIENT_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 // Sets the default UpdateEngineClient::Status. GetLastStatus() returns the 47 // Sets the default UpdateEngineClient::Status. GetLastStatus() returns the
48 // value set here if |status_queue_| is empty. 48 // value set here if |status_queue_| is empty.
49 void set_default_status(const UpdateEngineClient::Status& status); 49 void set_default_status(const UpdateEngineClient::Status& status);
50 50
51 // Sets a value returned by RequestUpdateCheck(). 51 // Sets a value returned by RequestUpdateCheck().
52 void set_update_check_result( 52 void set_update_check_result(
53 const UpdateEngineClient::UpdateCheckResult& result); 53 const UpdateEngineClient::UpdateCheckResult& result);
54 54
55 void set_can_rollback_check_result(bool result) {
56 can_rollback_stub_result_ = result;
57 }
58
55 // Returns how many times RebootAfterUpdate() is called. 59 // Returns how many times RebootAfterUpdate() is called.
56 int reboot_after_update_call_count() { 60 const int reboot_after_update_call_count() {
oshima 2014/04/01 13:51:06 Sorry if I wasn't clear. I meant this should be co
57 return reboot_after_update_call_count_; 61 return reboot_after_update_call_count_;
58 } 62 }
59 63
64 // Returns how many times Rollback() is called.
65 const int rollback_call_count() { return rollback_call_count_; }
66
67 // Returns how many times Rollback() is called.
68 const int can_rollback_call_count() { return can_rollback_call_count_; }
69
60 private: 70 private:
61 std::queue<UpdateEngineClient::Status> status_queue_; 71 std::queue<UpdateEngineClient::Status> status_queue_;
62 UpdateEngineClient::Status default_status_; 72 UpdateEngineClient::Status default_status_;
63 UpdateEngineClient::UpdateCheckResult update_check_result_; 73 UpdateEngineClient::UpdateCheckResult update_check_result_;
74 bool can_rollback_stub_result_;
64 int reboot_after_update_call_count_; 75 int reboot_after_update_call_count_;
76 int rollback_call_count_;
77 int can_rollback_call_count_;
65 }; 78 };
66 79
67 } // namespace chromeos 80 } // namespace chromeos
68 81
69 #endif // CHROMEOS_DBUS_FAKE_UPDATE_ENGINE_CLIENT_H_ 82 #endif // CHROMEOS_DBUS_FAKE_UPDATE_ENGINE_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chromeos/dbus/fake_update_engine_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698