| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // Mock ServerConnectionManager class for use in client unit tests. | 5 // Mock ServerConnectionManager class for use in client unit tests. |
| 6 | 6 |
| 7 #ifndef CHROME_TEST_SYNC_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 7 #ifndef CHROME_TEST_SYNC_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
| 8 #define CHROME_TEST_SYNC_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 8 #define CHROME_TEST_SYNC_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
| 9 | 9 |
| 10 #include <bitset> | 10 #include <bitset> |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 next_new_id_ = value; | 151 next_new_id_ = value; |
| 152 } | 152 } |
| 153 void set_conflict_n_commits(int value) { | 153 void set_conflict_n_commits(int value) { |
| 154 conflict_n_commits_ = value; | 154 conflict_n_commits_ = value; |
| 155 } | 155 } |
| 156 | 156 |
| 157 void set_use_legacy_bookmarks_protocol(bool value) { | 157 void set_use_legacy_bookmarks_protocol(bool value) { |
| 158 use_legacy_bookmarks_protocol_ = value; | 158 use_legacy_bookmarks_protocol_ = value; |
| 159 } | 159 } |
| 160 | 160 |
| 161 void set_store_birthday(string new_birthday) { |
| 162 store_birthday_ = new_birthday; |
| 163 } |
| 164 |
| 161 // Retrieve the number of GetUpdates requests that the mock server has | 165 // Retrieve the number of GetUpdates requests that the mock server has |
| 162 // seen since the last time this function was called. Can be used to | 166 // seen since the last time this function was called. Can be used to |
| 163 // verify that a GetUpdates actually did or did not happen after running | 167 // verify that a GetUpdates actually did or did not happen after running |
| 164 // the syncer. | 168 // the syncer. |
| 165 int GetAndClearNumGetUpdatesRequests() { | 169 int GetAndClearNumGetUpdatesRequests() { |
| 166 int result = num_get_updates_requests_; | 170 int result = num_get_updates_requests_; |
| 167 num_get_updates_requests_ = 0; | 171 num_get_updates_requests_ = 0; |
| 168 return result; | 172 return result; |
| 169 } | 173 } |
| 170 | 174 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 std::bitset<syncable::MODEL_TYPE_COUNT> expected_filter_; | 284 std::bitset<syncable::MODEL_TYPE_COUNT> expected_filter_; |
| 281 | 285 |
| 282 int num_get_updates_requests_; | 286 int num_get_updates_requests_; |
| 283 | 287 |
| 284 sync_pb::ClientToServerMessage last_request_; | 288 sync_pb::ClientToServerMessage last_request_; |
| 285 | 289 |
| 286 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); | 290 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); |
| 287 }; | 291 }; |
| 288 | 292 |
| 289 #endif // CHROME_TEST_SYNC_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 293 #endif // CHROME_TEST_SYNC_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
| OLD | NEW |