OLD | NEW |
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 #ifndef COMPONENTS_SYNC_CORE_TEST_FAKE_SYNC_MANAGER_H_ | 5 #ifndef COMPONENTS_SYNC_CORE_TEST_FAKE_SYNC_MANAGER_H_ |
6 #define COMPONENTS_SYNC_CORE_TEST_FAKE_SYNC_MANAGER_H_ | 6 #define COMPONENTS_SYNC_CORE_TEST_FAKE_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 base::Time last_poll_time) override; | 82 base::Time last_poll_time) override; |
83 void ConfigureSyncer(ConfigureReason reason, | 83 void ConfigureSyncer(ConfigureReason reason, |
84 ModelTypeSet to_download, | 84 ModelTypeSet to_download, |
85 ModelTypeSet to_purge, | 85 ModelTypeSet to_purge, |
86 ModelTypeSet to_journal, | 86 ModelTypeSet to_journal, |
87 ModelTypeSet to_unapply, | 87 ModelTypeSet to_unapply, |
88 const ModelSafeRoutingInfo& new_routing_info, | 88 const ModelSafeRoutingInfo& new_routing_info, |
89 const base::Closure& ready_task, | 89 const base::Closure& ready_task, |
90 const base::Closure& retry_task) override; | 90 const base::Closure& retry_task) override; |
91 void OnIncomingInvalidation( | 91 void OnIncomingInvalidation( |
92 syncer::ModelType type, | 92 ModelType type, |
93 std::unique_ptr<InvalidationInterface> interface) override; | 93 std::unique_ptr<InvalidationInterface> interface) override; |
94 void SetInvalidatorEnabled(bool invalidator_enabled) override; | 94 void SetInvalidatorEnabled(bool invalidator_enabled) override; |
95 void AddObserver(Observer* observer) override; | 95 void AddObserver(Observer* observer) override; |
96 void RemoveObserver(Observer* observer) override; | 96 void RemoveObserver(Observer* observer) override; |
97 SyncStatus GetDetailedStatus() const override; | 97 SyncStatus GetDetailedStatus() const override; |
98 void SaveChanges() override; | 98 void SaveChanges() override; |
99 void ShutdownOnSyncThread(ShutdownReason reason) override; | 99 void ShutdownOnSyncThread(ShutdownReason reason) override; |
100 UserShare* GetUserShare() override; | 100 UserShare* GetUserShare() override; |
101 std::unique_ptr<syncer_v2::ModelTypeConnector> GetModelTypeConnectorProxy() | 101 std::unique_ptr<ModelTypeConnector> GetModelTypeConnectorProxy() override; |
102 override; | |
103 const std::string cache_guid() override; | 102 const std::string cache_guid() override; |
104 bool ReceivedExperiment(Experiments* experiments) override; | 103 bool ReceivedExperiment(Experiments* experiments) override; |
105 bool HasUnsyncedItems() override; | 104 bool HasUnsyncedItems() override; |
106 SyncEncryptionHandler* GetEncryptionHandler() override; | 105 SyncEncryptionHandler* GetEncryptionHandler() override; |
107 std::vector<std::unique_ptr<ProtocolEvent>> GetBufferedProtocolEvents() | 106 std::vector<std::unique_ptr<ProtocolEvent>> GetBufferedProtocolEvents() |
108 override; | 107 override; |
109 void RefreshTypes(ModelTypeSet types) override; | 108 void RefreshTypes(ModelTypeSet types) override; |
110 void RegisterDirectoryTypeDebugInfoObserver( | 109 void RegisterDirectoryTypeDebugInfoObserver( |
111 syncer::TypeDebugInfoObserver* observer) override; | 110 TypeDebugInfoObserver* observer) override; |
112 void UnregisterDirectoryTypeDebugInfoObserver( | 111 void UnregisterDirectoryTypeDebugInfoObserver( |
113 syncer::TypeDebugInfoObserver* observer) override; | 112 TypeDebugInfoObserver* observer) override; |
114 bool HasDirectoryTypeDebugInfoObserver( | 113 bool HasDirectoryTypeDebugInfoObserver( |
115 syncer::TypeDebugInfoObserver* observer) override; | 114 TypeDebugInfoObserver* observer) override; |
116 void RequestEmitDebugInfo() override; | 115 void RequestEmitDebugInfo() override; |
117 void ClearServerData(const ClearServerDataCallback& callback) override; | 116 void ClearServerData(const ClearServerDataCallback& callback) override; |
118 void OnCookieJarChanged(bool account_mismatch, bool empty_jar) override; | 117 void OnCookieJarChanged(bool account_mismatch, bool empty_jar) override; |
119 | 118 |
120 private: | 119 private: |
121 scoped_refptr<base::SequencedTaskRunner> sync_task_runner_; | 120 scoped_refptr<base::SequencedTaskRunner> sync_task_runner_; |
122 | 121 |
123 base::ObserverList<SyncManager::Observer> observers_; | 122 base::ObserverList<SyncManager::Observer> observers_; |
124 | 123 |
125 // Faked directory state. | 124 // Faked directory state. |
(...skipping 23 matching lines...) Expand all Loading... |
149 | 148 |
150 // Number of invalidations received since startup. | 149 // Number of invalidations received since startup. |
151 int num_invalidations_received_; | 150 int num_invalidations_received_; |
152 | 151 |
153 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager); | 152 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager); |
154 }; | 153 }; |
155 | 154 |
156 } // namespace syncer | 155 } // namespace syncer |
157 | 156 |
158 #endif // COMPONENTS_SYNC_CORE_TEST_FAKE_SYNC_MANAGER_H_ | 157 #endif // COMPONENTS_SYNC_CORE_TEST_FAKE_SYNC_MANAGER_H_ |
OLD | NEW |