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

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: Unused js API removed. 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
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_callback_check_result(bool result);
56
55 // Returns how many times RebootAfterUpdate() is called. 57 // Returns how many times RebootAfterUpdate() is called.
56 int reboot_after_update_call_count() { 58 int reboot_after_update_call_count() {
57 return reboot_after_update_call_count_; 59 return reboot_after_update_call_count_;
58 } 60 }
59 61
62 // Returns how many times Rollback() is called.
63 int rollback_call_count() {
ygorshenin1 2014/03/31 13:57:57 Both methods can be folded to a single line.
merkulova 2014/03/31 15:33:58 Done.
64 return rollback_call_count_;
65 }
66
67 // Returns how many times Rollback() is called.
68 int can_rollback_call_count() {
69 return can_rollback_call_count_;
70 }
71
60 private: 72 private:
61 std::queue<UpdateEngineClient::Status> status_queue_; 73 std::queue<UpdateEngineClient::Status> status_queue_;
62 UpdateEngineClient::Status default_status_; 74 UpdateEngineClient::Status default_status_;
63 UpdateEngineClient::UpdateCheckResult update_check_result_; 75 UpdateEngineClient::UpdateCheckResult update_check_result_;
76 bool can_rollback_stub_result;
64 int reboot_after_update_call_count_; 77 int reboot_after_update_call_count_;
78 int rollback_call_count_;
79 int can_rollback_call_count_;
65 }; 80 };
66 81
67 } // namespace chromeos 82 } // namespace chromeos
68 83
69 #endif // CHROMEOS_DBUS_FAKE_UPDATE_ENGINE_CLIENT_H_ 84 #endif // CHROMEOS_DBUS_FAKE_UPDATE_ENGINE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698