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 SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 24 matching lines...) Expand all Loading... | |
35 // changes to these models don't need to be pushed to a | 35 // changes to these models don't need to be pushed to a |
36 // native model. | 36 // native model. |
37 GROUP_UI, // Models that live on UI thread and are being synced. | 37 GROUP_UI, // Models that live on UI thread and are being synced. |
38 GROUP_DB, // Models that live on DB thread and are being synced. | 38 GROUP_DB, // Models that live on DB thread and are being synced. |
39 GROUP_FILE, // Models that live on FILE thread and are being synced. | 39 GROUP_FILE, // Models that live on FILE thread and are being synced. |
40 GROUP_HISTORY, // Models that live on history thread and are being | 40 GROUP_HISTORY, // Models that live on history thread and are being |
41 // synced. | 41 // synced. |
42 GROUP_PASSWORD, // Models that live on the password thread and are | 42 GROUP_PASSWORD, // Models that live on the password thread and are |
43 // being synced. On windows and linux, this runs on the | 43 // being synced. On windows and linux, this runs on the |
44 // DB thread. | 44 // DB thread. |
45 MODEL_SAFE_GROUP_COUNT, | 45 GROUP_NON_BLOCKING, // Models that correspond to non-blocking types. These |
46 // models always stay in GROUP_NON_BLOCKING, changest are | |
maxbogue
2016/04/04 18:08:14
s/, changest/; changes/
pavely
2016/04/05 18:21:52
Done. Thanks.
| |
47 // forwarded to these models without ModelSafeWorker/ | |
48 // SyncBackendRegistrar involvement. | |
46 }; | 49 }; |
47 | 50 |
48 SYNC_EXPORT std::string ModelSafeGroupToString(ModelSafeGroup group); | 51 SYNC_EXPORT std::string ModelSafeGroupToString(ModelSafeGroup group); |
49 | 52 |
50 // WorkerLoopDestructionObserver is notified when the thread where it works | 53 // WorkerLoopDestructionObserver is notified when the thread where it works |
51 // is going to be destroyed. | 54 // is going to be destroyed. |
52 class WorkerLoopDestructionObserver { | 55 class WorkerLoopDestructionObserver { |
53 public: | 56 public: |
54 virtual void OnWorkerLoopDestroyed(ModelSafeGroup group) = 0; | 57 virtual void OnWorkerLoopDestroyed(ModelSafeGroup group) = 0; |
55 }; | 58 }; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 SYNC_EXPORT ModelTypeSet GetRoutingInfoTypes( | 161 SYNC_EXPORT ModelTypeSet GetRoutingInfoTypes( |
159 const ModelSafeRoutingInfo& routing_info); | 162 const ModelSafeRoutingInfo& routing_info); |
160 | 163 |
161 SYNC_EXPORT ModelSafeGroup GetGroupForModelType( | 164 SYNC_EXPORT ModelSafeGroup GetGroupForModelType( |
162 const ModelType type, | 165 const ModelType type, |
163 const ModelSafeRoutingInfo& routes); | 166 const ModelSafeRoutingInfo& routes); |
164 | 167 |
165 } // namespace syncer | 168 } // namespace syncer |
166 | 169 |
167 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ | 170 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ |
OLD | NEW |