| Index: components/sync/engine_impl/loopback_server/loopback_server.h
|
| diff --git a/components/sync/engine_impl/loopback_server/loopback_server.h b/components/sync/engine_impl/loopback_server/loopback_server.h
|
| index d9fac61c1fca92c69fe6dfea69a0766e5bc97809..a69c99e4ac7c7da84751a21b88d3da0642352830 100644
|
| --- a/components/sync/engine_impl/loopback_server/loopback_server.h
|
| +++ b/components/sync/engine_impl/loopback_server/loopback_server.h
|
| @@ -22,25 +22,11 @@
|
| #include "components/sync/protocol/loopback_server.pb.h"
|
| #include "components/sync/protocol/sync.pb.h"
|
|
|
| -namespace fake_server {
|
| -class FakeServer;
|
| -}
|
| -
|
| namespace syncer {
|
|
|
| // A loopback version of the Sync server used for local profile serialization.
|
| class LoopbackServer {
|
| public:
|
| - class ObserverForTests {
|
| - public:
|
| - virtual ~ObserverForTests() {}
|
| -
|
| - // Called after the server has processed a successful commit. The types
|
| - // updated as part of the commit are passed in |committed_model_types|.
|
| - virtual void OnCommit(const std::string& committer_id,
|
| - syncer::ModelTypeSet committed_model_types) = 0;
|
| - };
|
| -
|
| explicit LoopbackServer(const base::FilePath& persistent_file);
|
| virtual ~LoopbackServer();
|
|
|
| @@ -54,9 +40,6 @@
|
| std::string* response);
|
|
|
| private:
|
| - // Allow the FakeServer decorator to inspect the internals of this class.
|
| - friend class fake_server::FakeServer;
|
| -
|
| using EntityMap =
|
| std::map<std::string, std::unique_ptr<LoopbackServerEntity>>;
|
|
|
| @@ -119,35 +102,6 @@
|
| // Returns the store birthday.
|
| std::string GetStoreBirthday() const;
|
|
|
| - // Returns all entities stored by the server of the given |model_type|.
|
| - // This method is only used in tests.
|
| - std::vector<sync_pb::SyncEntity> GetSyncEntitiesByModelType(
|
| - syncer::ModelType model_type);
|
| -
|
| - // Creates a DicionaryValue representation of all entities present in the
|
| - // server. The dictionary keys are the strings generated by ModelTypeToString
|
| - // and the values are ListValues containing StringValue versions of entity
|
| - // names. Used by test to verify the contents of the server state.
|
| - std::unique_ptr<base::DictionaryValue> GetEntitiesAsDictionaryValue();
|
| -
|
| - // Modifies the entity on the server with the given |id|. The entity's
|
| - // EntitySpecifics are replaced with |updated_specifics| and its version is
|
| - // updated to n+1. If the given |id| does not exist or the ModelType of
|
| - // |updated_specifics| does not match the entity, false is returned.
|
| - // Otherwise, true is returned to represent a successful modification.
|
| - //
|
| - // This method sometimes updates entity data beyond EntitySpecifics. For
|
| - // example, in the case of a bookmark, changing the BookmarkSpecifics title
|
| - // field will modify the top-level entity's name field.
|
| - // This method is only used in tests.
|
| - bool ModifyEntitySpecifics(const std::string& id,
|
| - const sync_pb::EntitySpecifics& updated_specifics);
|
| -
|
| - // This method is only used in tests.
|
| - bool ModifyBookmarkEntity(const std::string& id,
|
| - const std::string& parent_id,
|
| - const sync_pb::EntitySpecifics& updated_specifics);
|
| -
|
| // Serializes the server state to |proto|.
|
| void SerializeState(sync_pb::LoopbackServerProto* proto) const;
|
|
|
| @@ -159,10 +113,6 @@
|
|
|
| // Loads all entities and server state from a protobuf file in |filename|.
|
| bool LoadStateFromFile(const base::FilePath& filename);
|
| -
|
| - void set_observer_for_tests(ObserverForTests* observer) {
|
| - observer_for_tests_ = observer;
|
| - }
|
|
|
| // This is the last version number assigned to an entity. The next entity will
|
| // have a version number of version_ + 1.
|
| @@ -178,9 +128,6 @@
|
|
|
| // Used to verify that LoopbackServer is only used from one thread.
|
| base::ThreadChecker thread_checker_;
|
| -
|
| - // Used to observe the completion of commit messages for the sake of testing.
|
| - ObserverForTests* observer_for_tests_;
|
| };
|
|
|
| } // namespace syncer
|
|
|