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_ENGINE_FAKE_SYNC_MANAGER_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_FAKE_SYNC_MANAGER_H_ |
6 #define COMPONENTS_SYNC_ENGINE_FAKE_SYNC_MANAGER_H_ | 6 #define COMPONENTS_SYNC_ENGINE_FAKE_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
| 12 #include "base/callback_forward.h" |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
14 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
15 #include "components/sync/engine/fake_model_type_connector.h" | 16 #include "components/sync/engine/fake_model_type_connector.h" |
16 #include "components/sync/engine/sync_manager.h" | 17 #include "components/sync/engine/sync_manager.h" |
17 #include "components/sync/syncable/test_user_share.h" | 18 #include "components/sync/syncable/test_user_share.h" |
18 #include "components/sync/test/fake_sync_encryption_handler.h" | 19 #include "components/sync/test/fake_sync_encryption_handler.h" |
19 | 20 |
20 namespace base { | 21 namespace base { |
21 class SequencedTaskRunner; | 22 class SequencedTaskRunner; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 std::vector<std::unique_ptr<ProtocolEvent>> GetBufferedProtocolEvents() | 108 std::vector<std::unique_ptr<ProtocolEvent>> GetBufferedProtocolEvents() |
108 override; | 109 override; |
109 void RefreshTypes(ModelTypeSet types) override; | 110 void RefreshTypes(ModelTypeSet types) override; |
110 void RegisterDirectoryTypeDebugInfoObserver( | 111 void RegisterDirectoryTypeDebugInfoObserver( |
111 TypeDebugInfoObserver* observer) override; | 112 TypeDebugInfoObserver* observer) override; |
112 void UnregisterDirectoryTypeDebugInfoObserver( | 113 void UnregisterDirectoryTypeDebugInfoObserver( |
113 TypeDebugInfoObserver* observer) override; | 114 TypeDebugInfoObserver* observer) override; |
114 bool HasDirectoryTypeDebugInfoObserver( | 115 bool HasDirectoryTypeDebugInfoObserver( |
115 TypeDebugInfoObserver* observer) override; | 116 TypeDebugInfoObserver* observer) override; |
116 void RequestEmitDebugInfo() override; | 117 void RequestEmitDebugInfo() override; |
117 void ClearServerData(const ClearServerDataCallback& callback) override; | 118 void ClearServerData(const base::Closure& callback) override; |
118 void OnCookieJarChanged(bool account_mismatch, bool empty_jar) override; | 119 void OnCookieJarChanged(bool account_mismatch, bool empty_jar) override; |
119 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) override; | 120 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) override; |
120 | 121 |
121 private: | 122 private: |
122 scoped_refptr<base::SequencedTaskRunner> sync_task_runner_; | 123 scoped_refptr<base::SequencedTaskRunner> sync_task_runner_; |
123 | 124 |
124 base::ObserverList<SyncManager::Observer> observers_; | 125 base::ObserverList<SyncManager::Observer> observers_; |
125 | 126 |
126 // Faked directory state. | 127 // Faked directory state. |
127 ModelTypeSet initial_sync_ended_types_; | 128 ModelTypeSet initial_sync_ended_types_; |
(...skipping 24 matching lines...) Expand all Loading... |
152 | 153 |
153 // Number of invalidations received since startup. | 154 // Number of invalidations received since startup. |
154 int num_invalidations_received_; | 155 int num_invalidations_received_; |
155 | 156 |
156 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager); | 157 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager); |
157 }; | 158 }; |
158 | 159 |
159 } // namespace syncer | 160 } // namespace syncer |
160 | 161 |
161 #endif // COMPONENTS_SYNC_ENGINE_FAKE_SYNC_MANAGER_H_ | 162 #endif // COMPONENTS_SYNC_ENGINE_FAKE_SYNC_MANAGER_H_ |
OLD | NEW |