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

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

Issue 1866243002: Convert //sync from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 // Mock ServerConnectionManager class for use in client unit tests. 5 // Mock ServerConnectionManager class for use in client unit tests.
6 6
7 #ifndef SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 7 #ifndef SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
8 #define SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 8 #define SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
9 9
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 // Whether we are faking a server mandating clients to partial throttle 387 // Whether we are faking a server mandating clients to partial throttle
388 // requests. 388 // requests.
389 // Protected by |response_code_override_lock_|. 389 // Protected by |response_code_override_lock_|.
390 bool partialThrottling_; 390 bool partialThrottling_;
391 391
392 base::Lock response_code_override_lock_; 392 base::Lock response_code_override_lock_;
393 393
394 // True if we are only accepting GetUpdatesCallerInfo::PERIODIC requests. 394 // True if we are only accepting GetUpdatesCallerInfo::PERIODIC requests.
395 bool fail_non_periodic_get_updates_; 395 bool fail_non_periodic_get_updates_;
396 396
397 scoped_ptr<sync_pb::ClientCommand> gu_client_command_; 397 std::unique_ptr<sync_pb::ClientCommand> gu_client_command_;
398 scoped_ptr<sync_pb::ClientCommand> commit_client_command_; 398 std::unique_ptr<sync_pb::ClientCommand> commit_client_command_;
399 399
400 // The next value to use for the position_in_parent property. 400 // The next value to use for the position_in_parent property.
401 int64_t next_position_in_parent_; 401 int64_t next_position_in_parent_;
402 402
403 // The default is to use the newer sync_pb::BookmarkSpecifics-style protocol. 403 // The default is to use the newer sync_pb::BookmarkSpecifics-style protocol.
404 // If this option is set to true, then the MockConnectionManager will 404 // If this option is set to true, then the MockConnectionManager will
405 // use the older sync_pb::SyncEntity_BookmarkData-style protocol. 405 // use the older sync_pb::SyncEntity_BookmarkData-style protocol.
406 bool use_legacy_bookmarks_protocol_; 406 bool use_legacy_bookmarks_protocol_;
407 407
408 ModelTypeSet expected_filter_; 408 ModelTypeSet expected_filter_;
409 409
410 ModelTypeSet throttled_type_; 410 ModelTypeSet throttled_type_;
411 411
412 int num_get_updates_requests_; 412 int num_get_updates_requests_;
413 413
414 std::string next_token_; 414 std::string next_token_;
415 415
416 std::vector<sync_pb::ClientToServerMessage> requests_; 416 std::vector<sync_pb::ClientToServerMessage> requests_;
417 417
418 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); 418 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager);
419 }; 419 };
420 420
421 } // namespace syncer 421 } // namespace syncer
422 422
423 #endif // SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 423 #endif // SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698