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

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

Issue 10559104: sync: Process 'control' data separately (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename, cleanup, fix tests Created 8 years, 6 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
« no previous file with comments | « sync/engine/syncer_util.cc ('k') | sync/internal_api/public/syncable/model_type.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 17 matching lines...) Expand all
28 // changes to these models don't need to be pushed to a 28 // changes to these models don't need to be pushed to a
29 // native model. 29 // native model.
30 GROUP_UI, // Models that live on UI thread and are being synced. 30 GROUP_UI, // Models that live on UI thread and are being synced.
31 GROUP_DB, // Models that live on DB thread and are being synced. 31 GROUP_DB, // Models that live on DB thread and are being synced.
32 GROUP_FILE, // Models that live on FILE thread and are being synced. 32 GROUP_FILE, // Models that live on FILE thread and are being synced.
33 GROUP_HISTORY, // Models that live on history thread and are being 33 GROUP_HISTORY, // Models that live on history thread and are being
34 // synced. 34 // synced.
35 GROUP_PASSWORD, // Models that live on the password thread and are 35 GROUP_PASSWORD, // Models that live on the password thread and are
36 // being synced. On windows and linux, this runs on the 36 // being synced. On windows and linux, this runs on the
37 // DB thread. 37 // DB thread.
38 GROUP_CONTROL, // Models that require special handling on the sync
39 // thread. These types have no associated model.
38 MODEL_SAFE_GROUP_COUNT, 40 MODEL_SAFE_GROUP_COUNT,
39 }; 41 };
40 42
41 std::string ModelSafeGroupToString(ModelSafeGroup group); 43 std::string ModelSafeGroupToString(ModelSafeGroup group);
42 44
43 // The Syncer uses a ModelSafeWorker for all tasks that could potentially 45 // The Syncer uses a ModelSafeWorker for all tasks that could potentially
44 // modify syncable entries (e.g under a WriteTransaction). The ModelSafeWorker 46 // modify syncable entries (e.g under a WriteTransaction). The ModelSafeWorker
45 // only knows how to do one thing, and that is take some work (in a fully 47 // only knows how to do one thing, and that is take some work (in a fully
46 // pre-bound callback) and have it performed (as in Run()) from a thread which 48 // pre-bound callback) and have it performed (as in Run()) from a thread which
47 // is guaranteed to be "model-safe", where "safe" refers to not allowing us to 49 // is guaranteed to be "model-safe", where "safe" refers to not allowing us to
(...skipping 30 matching lines...) Expand all
78 80
79 syncable::ModelTypeSet GetRoutingInfoTypes( 81 syncable::ModelTypeSet GetRoutingInfoTypes(
80 const ModelSafeRoutingInfo& routing_info); 82 const ModelSafeRoutingInfo& routing_info);
81 83
82 ModelSafeGroup GetGroupForModelType(const syncable::ModelType type, 84 ModelSafeGroup GetGroupForModelType(const syncable::ModelType type,
83 const ModelSafeRoutingInfo& routes); 85 const ModelSafeRoutingInfo& routes);
84 86
85 } // namespace csync 87 } // namespace csync
86 88
87 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ 89 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_
OLDNEW
« no previous file with comments | « sync/engine/syncer_util.cc ('k') | sync/internal_api/public/syncable/model_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698