OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_DRIVER_GLUE_SYNC_BACKEND_REGISTRAR_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_REGISTRAR_H_ |
6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_REGISTRAR_H_ | 6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_REGISTRAR_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <map> | 10 #include <map> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
11 #include "base/basictypes.h" | |
12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
14 #include "base/synchronization/lock.h" | 16 #include "base/synchronization/lock.h" |
15 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
16 #include "sync/internal_api/public/base/model_type.h" | 18 #include "sync/internal_api/public/base/model_type.h" |
17 #include "sync/internal_api/public/engine/model_safe_worker.h" | 19 #include "sync/internal_api/public/engine/model_safe_worker.h" |
18 #include "sync/internal_api/public/sync_manager.h" | 20 #include "sync/internal_api/public/sync_manager.h" |
19 | 21 |
20 class Profile; | 22 class Profile; |
21 | 23 |
22 namespace base { | 24 namespace base { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 void DeactivateDataType(syncer::ModelType type); | 106 void DeactivateDataType(syncer::ModelType type); |
105 | 107 |
106 // Returns true only between calls to ActivateDataType(type, ...) | 108 // Returns true only between calls to ActivateDataType(type, ...) |
107 // and DeactivateDataType(type). Used only by tests. | 109 // and DeactivateDataType(type). Used only by tests. |
108 bool IsTypeActivatedForTest(syncer::ModelType type) const; | 110 bool IsTypeActivatedForTest(syncer::ModelType type) const; |
109 | 111 |
110 // SyncManager::ChangeDelegate implementation. May be called from | 112 // SyncManager::ChangeDelegate implementation. May be called from |
111 // any thread. | 113 // any thread. |
112 void OnChangesApplied( | 114 void OnChangesApplied( |
113 syncer::ModelType model_type, | 115 syncer::ModelType model_type, |
114 int64 model_version, | 116 int64_t model_version, |
115 const syncer::BaseTransaction* trans, | 117 const syncer::BaseTransaction* trans, |
116 const syncer::ImmutableChangeRecordList& changes) override; | 118 const syncer::ImmutableChangeRecordList& changes) override; |
117 void OnChangesComplete(syncer::ModelType model_type) override; | 119 void OnChangesComplete(syncer::ModelType model_type) override; |
118 | 120 |
119 void GetWorkers(std::vector<scoped_refptr<syncer::ModelSafeWorker>>* out); | 121 void GetWorkers(std::vector<scoped_refptr<syncer::ModelSafeWorker>>* out); |
120 void GetModelSafeRoutingInfo(syncer::ModelSafeRoutingInfo* out); | 122 void GetModelSafeRoutingInfo(syncer::ModelSafeRoutingInfo* out); |
121 | 123 |
122 // syncer::WorkerLoopDestructionObserver implementation. | 124 // syncer::WorkerLoopDestructionObserver implementation. |
123 void OnWorkerLoopDestroyed(syncer::ModelSafeGroup group) override; | 125 void OnWorkerLoopDestroyed(syncer::ModelSafeGroup group) override; |
124 | 126 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 // e.g. Shutdown() depends on |lock_|, SyncManager::Init() depends on | 208 // e.g. Shutdown() depends on |lock_|, SyncManager::Init() depends on |
207 // workers, etc. | 209 // workers, etc. |
208 scoped_ptr<base::Thread> sync_thread_; | 210 scoped_ptr<base::Thread> sync_thread_; |
209 | 211 |
210 DISALLOW_COPY_AND_ASSIGN(SyncBackendRegistrar); | 212 DISALLOW_COPY_AND_ASSIGN(SyncBackendRegistrar); |
211 }; | 213 }; |
212 | 214 |
213 } // namespace browser_sync | 215 } // namespace browser_sync |
214 | 216 |
215 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_REGISTRAR_H_ | 217 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_REGISTRAR_H_ |
OLD | NEW |