| Index: sync/test/engine/mock_connection_manager.h
|
| diff --git a/sync/test/engine/mock_connection_manager.h b/sync/test/engine/mock_connection_manager.h
|
| index 008887b428015fcb0b029397ac8f424d7fb5cb00..ad8da0d1255b0251d015c32bb21bd18b99e72d5a 100644
|
| --- a/sync/test/engine/mock_connection_manager.h
|
| +++ b/sync/test/engine/mock_connection_manager.h
|
| @@ -18,6 +18,7 @@
|
| #include "sync/engine/net/server_connection_manager.h"
|
| #include "sync/internal_api/public/base/model_type.h"
|
| #include "sync/internal_api/public/base/model_type_invalidation_map.h"
|
| +#include "sync/internal_api/public/base/unique_position.h"
|
| #include "sync/protocol/sync.pb.h"
|
|
|
| namespace syncer {
|
| @@ -92,6 +93,13 @@ class MockConnectionManager : public ServerConnectionManager {
|
| sync_pb::SyncEntity* AddUpdateSpecifics(int id, int parent_id,
|
| std::string name,int64 version, int64 sync_ts, bool is_dir,
|
| int64 position, const sync_pb::EntitySpecifics& specifics);
|
| + sync_pb::SyncEntity* AddBookmarkUpdateSpecifics(
|
| + int id, int parent_id, std::string name, int64 version, int64 sync_ts,
|
| + bool is_dir, int64 position, const sync_pb::EntitySpecifics& specifics);
|
| + sync_pb::SyncEntity* AddBookmarkUpdateSpecifics(int id, int parent_id,
|
| + std::string name, int64 version, int64 sync_ts, bool is_dir,
|
| + const syncer::UniquePosition& position,
|
| + const sync_pb::EntitySpecifics& specifics);
|
| sync_pb::SyncEntity* SetNigori(int id, int64 version, int64 sync_ts,
|
| const sync_pb::EntitySpecifics& specifics);
|
|
|
| @@ -268,6 +276,15 @@ class MockConnectionManager : public ServerConnectionManager {
|
| sync_pb::DataTypeProgressMarker>& filter,
|
| ModelType value);
|
|
|
| + // Sets some reasonable values for originator_item_id and
|
| + // originator_cache_guid if the given entity is of type BOOKMARKS.
|
| + //
|
| + // Unfortunately, there's no guarantee that a single item will always have the
|
| + // same originator_client_item_id, though such a guarantee would be exist in a
|
| + // real sync system. This could lead to spurious position changes in some
|
| + // situations.
|
| + void SetUpdateOriginatorFields(sync_pb::SyncEntity* ent);
|
| +
|
| // When false, we pretend to have network connectivity issues.
|
| bool server_reachable_;
|
|
|
| @@ -349,6 +366,9 @@ class MockConnectionManager : public ServerConnectionManager {
|
|
|
| sync_pb::ClientToServerMessage last_request_;
|
|
|
| + // A unique originator_item_id value.
|
| + int64 originator_item_id_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(MockConnectionManager);
|
| };
|
|
|
|
|