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

Side by Side Diff: chrome/browser/sync/test/engine/mock_connection_manager.h

Issue 8919021: [Sync] Rename ModelEnumSet to ModelTypeSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 7 #ifndef CHROME_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
8 #define CHROME_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 8 #define CHROME_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // the syncer. 200 // the syncer.
201 int GetAndClearNumGetUpdatesRequests() { 201 int GetAndClearNumGetUpdatesRequests() {
202 int result = num_get_updates_requests_; 202 int result = num_get_updates_requests_;
203 num_get_updates_requests_ = 0; 203 num_get_updates_requests_ = 0;
204 return result; 204 return result;
205 } 205 }
206 206
207 // Expect that GetUpdates will request exactly the types indicated in 207 // Expect that GetUpdates will request exactly the types indicated in
208 // the bitset. 208 // the bitset.
209 void ExpectGetUpdatesRequestTypes( 209 void ExpectGetUpdatesRequestTypes(
210 syncable::ModelEnumSet expected_filter) { 210 syncable::ModelTypeSet expected_filter) {
211 expected_filter_ = expected_filter; 211 expected_filter_ = expected_filter;
212 } 212 }
213 213
214 void ExpectGetUpdatesRequestPayloads( 214 void ExpectGetUpdatesRequestPayloads(
215 const syncable::ModelTypePayloadMap& payloads) { 215 const syncable::ModelTypePayloadMap& payloads) {
216 expected_payloads_ = payloads; 216 expected_payloads_ = payloads;
217 } 217 }
218 218
219 void SetServerReachable(); 219 void SetServerReachable();
220 220
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 scoped_ptr<sync_pb::ClientCommand> client_command_; 337 scoped_ptr<sync_pb::ClientCommand> client_command_;
338 338
339 // The next value to use for the position_in_parent property. 339 // The next value to use for the position_in_parent property.
340 int64 next_position_in_parent_; 340 int64 next_position_in_parent_;
341 341
342 // The default is to use the newer sync_pb::BookmarkSpecifics-style protocol. 342 // The default is to use the newer sync_pb::BookmarkSpecifics-style protocol.
343 // If this option is set to true, then the MockConnectionManager will 343 // If this option is set to true, then the MockConnectionManager will
344 // use the older sync_pb::SyncEntity_BookmarkData-style protocol. 344 // use the older sync_pb::SyncEntity_BookmarkData-style protocol.
345 bool use_legacy_bookmarks_protocol_; 345 bool use_legacy_bookmarks_protocol_;
346 346
347 syncable::ModelEnumSet expected_filter_; 347 syncable::ModelTypeSet expected_filter_;
348 348
349 syncable::ModelTypePayloadMap expected_payloads_; 349 syncable::ModelTypePayloadMap expected_payloads_;
350 350
351 int num_get_updates_requests_; 351 int num_get_updates_requests_;
352 352
353 std::string next_token_; 353 std::string next_token_;
354 354
355 sync_pb::ClientToServerMessage last_request_; 355 sync_pb::ClientToServerMessage last_request_;
356 356
357 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); 357 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager);
358 }; 358 };
359 359
360 #endif // CHROME_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 360 #endif // CHROME_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/syncable/transaction_observer.h ('k') | chrome/browser/sync/test/engine/test_directory_setter_upper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698