OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ | 5 #ifndef SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ |
6 #define SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ | 6 #define SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // |error_type_| or |triggered_actionable_error_|) on every other request. | 199 // |error_type_| or |triggered_actionable_error_|) on every other request. |
200 // |alternate_triggered_errors_| is set if this feature is enabled and | 200 // |alternate_triggered_errors_| is set if this feature is enabled and |
201 // |request_counter_| is used to send triggered errors on odd-numbered | 201 // |request_counter_| is used to send triggered errors on odd-numbered |
202 // requests. Note that |request_counter_| can be reset and is not necessarily | 202 // requests. Note that |request_counter_| can be reset and is not necessarily |
203 // indicative of the total number of requests handled during the object's | 203 // indicative of the total number of requests handled during the object's |
204 // lifetime. | 204 // lifetime. |
205 bool alternate_triggered_errors_; | 205 bool alternate_triggered_errors_; |
206 int request_counter_; | 206 int request_counter_; |
207 | 207 |
208 // FakeServer's observers. | 208 // FakeServer's observers. |
209 ObserverList<Observer, true> observers_; | 209 base::ObserverList<Observer, true> observers_; |
210 | 210 |
211 // When true, the server operates normally. When false, a failure is returned | 211 // When true, the server operates normally. When false, a failure is returned |
212 // on every request. This is used to simulate a network failure on the client. | 212 // on every request. This is used to simulate a network failure on the client. |
213 bool network_enabled_; | 213 bool network_enabled_; |
214 }; | 214 }; |
215 | 215 |
216 } // namespace fake_server | 216 } // namespace fake_server |
217 | 217 |
218 #endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ | 218 #endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ |
OLD | NEW |