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 CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_REGISTRAR_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_REGISTRAR_H_ |
6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_REGISTRAR_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_REGISTRAR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // Returns true only between calls to ActivateDataType(type, ...) | 102 // Returns true only between calls to ActivateDataType(type, ...) |
103 // and DeactivateDataType(type). Used only by tests. | 103 // and DeactivateDataType(type). Used only by tests. |
104 bool IsTypeActivatedForTest(syncer::ModelType type) const; | 104 bool IsTypeActivatedForTest(syncer::ModelType type) const; |
105 | 105 |
106 // SyncManager::ChangeDelegate implementation. May be called from | 106 // SyncManager::ChangeDelegate implementation. May be called from |
107 // any thread. | 107 // any thread. |
108 virtual void OnChangesApplied( | 108 virtual void OnChangesApplied( |
109 syncer::ModelType model_type, | 109 syncer::ModelType model_type, |
110 int64 model_version, | 110 int64 model_version, |
111 const syncer::BaseTransaction* trans, | 111 const syncer::BaseTransaction* trans, |
112 const syncer::ImmutableChangeRecordList& changes) OVERRIDE; | 112 const syncer::ImmutableChangeRecordList& changes) override; |
113 virtual void OnChangesComplete(syncer::ModelType model_type) OVERRIDE; | 113 virtual void OnChangesComplete(syncer::ModelType model_type) override; |
114 | 114 |
115 void GetWorkers(std::vector<scoped_refptr<syncer::ModelSafeWorker> >* out); | 115 void GetWorkers(std::vector<scoped_refptr<syncer::ModelSafeWorker> >* out); |
116 void GetModelSafeRoutingInfo(syncer::ModelSafeRoutingInfo* out); | 116 void GetModelSafeRoutingInfo(syncer::ModelSafeRoutingInfo* out); |
117 | 117 |
118 // syncer::WorkerLoopDestructionObserver implementation. | 118 // syncer::WorkerLoopDestructionObserver implementation. |
119 virtual void OnWorkerLoopDestroyed(syncer::ModelSafeGroup group) OVERRIDE; | 119 virtual void OnWorkerLoopDestroyed(syncer::ModelSafeGroup group) override; |
120 | 120 |
121 // Release ownership of |sync_thread_|. Called when sync is disabled. | 121 // Release ownership of |sync_thread_|. Called when sync is disabled. |
122 scoped_ptr<base::Thread> ReleaseSyncThread(); | 122 scoped_ptr<base::Thread> ReleaseSyncThread(); |
123 | 123 |
124 // Unregister workers from loop destruction observation. | 124 // Unregister workers from loop destruction observation. |
125 void Shutdown(); | 125 void Shutdown(); |
126 | 126 |
127 base::Thread* sync_thread(); | 127 base::Thread* sync_thread(); |
128 | 128 |
129 private: | 129 private: |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 // e.g. Shutdown() depends on |lock_|, SyncManager::Init() depends on | 189 // e.g. Shutdown() depends on |lock_|, SyncManager::Init() depends on |
190 // workers, etc. | 190 // workers, etc. |
191 scoped_ptr<base::Thread> sync_thread_; | 191 scoped_ptr<base::Thread> sync_thread_; |
192 | 192 |
193 DISALLOW_COPY_AND_ASSIGN(SyncBackendRegistrar); | 193 DISALLOW_COPY_AND_ASSIGN(SyncBackendRegistrar); |
194 }; | 194 }; |
195 | 195 |
196 } // namespace browser_sync | 196 } // namespace browser_sync |
197 | 197 |
198 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_REGISTRAR_H_ | 198 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_REGISTRAR_H_ |
OLD | NEW |