| Index: components/sync/test/engine/mock_connection_manager.h
|
| diff --git a/sync/test/engine/mock_connection_manager.h b/components/sync/test/engine/mock_connection_manager.h
|
| similarity index 93%
|
| rename from sync/test/engine/mock_connection_manager.h
|
| rename to components/sync/test/engine/mock_connection_manager.h
|
| index a47c4b30b17f4c3a435994f22552900147ab3262..27dfd37f74aa5d88de2fbbbfd32969dcf314355b 100644
|
| --- a/sync/test/engine/mock_connection_manager.h
|
| +++ b/components/sync/test/engine/mock_connection_manager.h
|
| @@ -4,8 +4,8 @@
|
| //
|
| // Mock ServerConnectionManager class for use in client unit tests.
|
|
|
| -#ifndef SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
|
| -#define SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
|
| +#ifndef COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
|
| +#define COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
|
|
|
| #include <stdint.h>
|
|
|
| @@ -19,10 +19,10 @@
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_vector.h"
|
| #include "base/synchronization/lock.h"
|
| -#include "sync/engine/net/server_connection_manager.h"
|
| -#include "sync/internal_api/public/base/model_type.h"
|
| -#include "sync/internal_api/public/base/unique_position.h"
|
| -#include "sync/protocol/sync.pb.h"
|
| +#include "components/sync/base/model_type.h"
|
| +#include "components/sync/base/unique_position.h"
|
| +#include "components/sync/engine_impl/net/server_connection_manager.h"
|
| +#include "components/sync/protocol/sync.pb.h"
|
|
|
| namespace syncer {
|
|
|
| @@ -36,8 +36,7 @@ class MockConnectionManager : public ServerConnectionManager {
|
| virtual ~MidCommitObserver() {}
|
| };
|
|
|
| - MockConnectionManager(syncable::Directory*,
|
| - CancelationSignal* signal);
|
| + MockConnectionManager(syncable::Directory*, CancelationSignal* signal);
|
| ~MockConnectionManager() override;
|
|
|
| // Overridden ServerConnectionManager functions.
|
| @@ -202,15 +201,9 @@ class MockConnectionManager : public ServerConnectionManager {
|
| // Retrieve the cumulative collection of all requests sent by clients.
|
| const std::vector<sync_pb::ClientToServerMessage>& requests() const;
|
|
|
| - void set_conflict_all_commits(bool value) {
|
| - conflict_all_commits_ = value;
|
| - }
|
| - void set_next_new_id(int value) {
|
| - next_new_id_ = value;
|
| - }
|
| - void set_conflict_n_commits(int value) {
|
| - conflict_n_commits_ = value;
|
| - }
|
| + void set_conflict_all_commits(bool value) { conflict_all_commits_ = value; }
|
| + void set_next_new_id(int value) { next_new_id_ = value; }
|
| + void set_conflict_n_commits(int value) { conflict_n_commits_ = value; }
|
|
|
| void set_use_legacy_bookmarks_protocol(bool value) {
|
| use_legacy_bookmarks_protocol_ = value;
|
| @@ -263,9 +256,7 @@ class MockConnectionManager : public ServerConnectionManager {
|
| }
|
|
|
| // Explicitly indicate that we will not be fetching some updates.
|
| - void ClearUpdatesQueue() {
|
| - update_queue_.clear();
|
| - }
|
| + void ClearUpdatesQueue() { update_queue_.clear(); }
|
|
|
| // Locate the most recent update message for purpose of alteration.
|
| sync_pb::SyncEntity* GetMutableLastUpdate();
|
| @@ -322,13 +313,13 @@ class MockConnectionManager : public ServerConnectionManager {
|
| // GetUpdates.from_progress_marker) indicates that a particular ModelType
|
| // should be included.
|
| bool IsModelTypePresentInSpecifics(
|
| - const google::protobuf::RepeatedPtrField<
|
| - sync_pb::DataTypeProgressMarker>& filter,
|
| + const google::protobuf::RepeatedPtrField<sync_pb::DataTypeProgressMarker>&
|
| + filter,
|
| ModelType value);
|
|
|
| sync_pb::DataTypeProgressMarker const* GetProgressMarkerForType(
|
| - const google::protobuf::RepeatedPtrField<
|
| - sync_pb::DataTypeProgressMarker>& filter,
|
| + const google::protobuf::RepeatedPtrField<sync_pb::DataTypeProgressMarker>&
|
| + filter,
|
| ModelType value);
|
|
|
| // When false, we pretend to have network connectivity issues.
|
| @@ -420,4 +411,4 @@ class MockConnectionManager : public ServerConnectionManager {
|
|
|
| } // namespace syncer
|
|
|
| -#endif // SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
|
| +#endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
|
|
|