OLD | NEW |
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 void set_can_rollback_check_result(bool result) { | 59 void set_can_rollback_check_result(bool result) { |
60 can_rollback_stub_result_ = result; | 60 can_rollback_stub_result_ = result; |
61 } | 61 } |
62 | 62 |
63 // Returns how many times RebootAfterUpdate() is called. | 63 // Returns how many times RebootAfterUpdate() is called. |
64 int reboot_after_update_call_count() const { | 64 int reboot_after_update_call_count() const { |
65 return reboot_after_update_call_count_; | 65 return reboot_after_update_call_count_; |
66 } | 66 } |
67 | 67 |
| 68 // Returns how many times RequestUpdateCheck() is called. |
| 69 int request_update_check_call_count() const { |
| 70 return request_update_check_call_count_; |
| 71 } |
| 72 |
68 // Returns how many times Rollback() is called. | 73 // Returns how many times Rollback() is called. |
69 int rollback_call_count() const { return rollback_call_count_; } | 74 int rollback_call_count() const { return rollback_call_count_; } |
70 | 75 |
71 // Returns how many times Rollback() is called. | 76 // Returns how many times Rollback() is called. |
72 int can_rollback_call_count() const { return can_rollback_call_count_; } | 77 int can_rollback_call_count() const { return can_rollback_call_count_; } |
73 | 78 |
74 private: | 79 private: |
75 ObserverList<Observer> observers_; | 80 ObserverList<Observer> observers_; |
76 std::queue<UpdateEngineClient::Status> status_queue_; | 81 std::queue<UpdateEngineClient::Status> status_queue_; |
77 UpdateEngineClient::Status default_status_; | 82 UpdateEngineClient::Status default_status_; |
78 UpdateEngineClient::UpdateCheckResult update_check_result_; | 83 UpdateEngineClient::UpdateCheckResult update_check_result_; |
79 bool can_rollback_stub_result_; | 84 bool can_rollback_stub_result_; |
80 int reboot_after_update_call_count_; | 85 int reboot_after_update_call_count_; |
| 86 int request_update_check_call_count_; |
81 int rollback_call_count_; | 87 int rollback_call_count_; |
82 int can_rollback_call_count_; | 88 int can_rollback_call_count_; |
83 }; | 89 }; |
84 | 90 |
85 } // namespace chromeos | 91 } // namespace chromeos |
86 | 92 |
87 #endif // CHROMEOS_DBUS_FAKE_UPDATE_ENGINE_CLIENT_H_ | 93 #endif // CHROMEOS_DBUS_FAKE_UPDATE_ENGINE_CLIENT_H_ |
OLD | NEW |