Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: sync/internal_api/public/engine/model_safe_worker.h

Issue 10825137: FYI: Control Data + Per-Device Metadata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 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 21 matching lines...) Expand all
32 // changes to these models don't need to be pushed to a 32 // changes to these models don't need to be pushed to a
33 // native model. 33 // native model.
34 GROUP_UI, // Models that live on UI thread and are being synced. 34 GROUP_UI, // Models that live on UI thread and are being synced.
35 GROUP_DB, // Models that live on DB thread and are being synced. 35 GROUP_DB, // Models that live on DB thread and are being synced.
36 GROUP_FILE, // Models that live on FILE thread and are being synced. 36 GROUP_FILE, // Models that live on FILE thread and are being synced.
37 GROUP_HISTORY, // Models that live on history thread and are being 37 GROUP_HISTORY, // Models that live on history thread and are being
38 // synced. 38 // synced.
39 GROUP_PASSWORD, // Models that live on the password thread and are 39 GROUP_PASSWORD, // Models that live on the password thread and are
40 // being synced. On windows and linux, this runs on the 40 // being synced. On windows and linux, this runs on the
41 // DB thread. 41 // DB thread.
42 GROUP_CONTROL, // Models that require special handling on the sync
43 // thread. These types have no associated model.
42 MODEL_SAFE_GROUP_COUNT, 44 MODEL_SAFE_GROUP_COUNT,
43 }; 45 };
44 46
45 SYNC_EXPORT std::string ModelSafeGroupToString(ModelSafeGroup group); 47 SYNC_EXPORT std::string ModelSafeGroupToString(ModelSafeGroup group);
46 48
47 // The Syncer uses a ModelSafeWorker for all tasks that could potentially 49 // The Syncer uses a ModelSafeWorker for all tasks that could potentially
48 // modify syncable entries (e.g under a WriteTransaction). The ModelSafeWorker 50 // modify syncable entries (e.g under a WriteTransaction). The ModelSafeWorker
49 // only knows how to do one thing, and that is take some work (in a fully 51 // only knows how to do one thing, and that is take some work (in a fully
50 // pre-bound callback) and have it performed (as in Run()) from a thread which 52 // pre-bound callback) and have it performed (as in Run()) from a thread which
51 // is guaranteed to be "model-safe", where "safe" refers to not allowing us to 53 // is guaranteed to be "model-safe", where "safe" refers to not allowing us to
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 SYNC_EXPORT ModelTypeSet GetRoutingInfoTypes( 91 SYNC_EXPORT ModelTypeSet GetRoutingInfoTypes(
90 const ModelSafeRoutingInfo& routing_info); 92 const ModelSafeRoutingInfo& routing_info);
91 93
92 SYNC_EXPORT ModelSafeGroup GetGroupForModelType( 94 SYNC_EXPORT ModelSafeGroup GetGroupForModelType(
93 const ModelType type, 95 const ModelType type,
94 const ModelSafeRoutingInfo& routes); 96 const ModelSafeRoutingInfo& routes);
95 97
96 } // namespace syncer 98 } // namespace syncer
97 99
98 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ 100 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698