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

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

Issue 9950137: [not for review] sync: Don't use group_restriction from ApplyUpdatesCommand. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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/apply_updates_command.cc ('k') | sync/engine/model_safe_worker.cc » ('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_ENGINE_MODEL_SAFE_WORKER_H_ 5 #ifndef SYNC_ENGINE_MODEL_SAFE_WORKER_H_
6 #define SYNC_ENGINE_MODEL_SAFE_WORKER_H_ 6 #define SYNC_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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Caller takes ownership of return value. 72 // Caller takes ownership of return value.
73 base::DictionaryValue* ModelSafeRoutingInfoToValue( 73 base::DictionaryValue* ModelSafeRoutingInfoToValue(
74 const ModelSafeRoutingInfo& routing_info); 74 const ModelSafeRoutingInfo& routing_info);
75 75
76 std::string ModelSafeRoutingInfoToString( 76 std::string ModelSafeRoutingInfoToString(
77 const ModelSafeRoutingInfo& routing_info); 77 const ModelSafeRoutingInfo& routing_info);
78 78
79 syncable::ModelTypeSet GetRoutingInfoTypes( 79 syncable::ModelTypeSet GetRoutingInfoTypes(
80 const ModelSafeRoutingInfo& routing_info); 80 const ModelSafeRoutingInfo& routing_info);
81 81
82 // Extracts a ModelTypeSet containing all types that map to |group| in
83 // |routing_info|.
84 syncable::FullModelTypeSet GetModelTypesForGroup(
85 ModelSafeGroup group,
86 const ModelSafeRoutingInfo& routing_info);
87
82 ModelSafeGroup GetGroupForModelType(const syncable::ModelType type, 88 ModelSafeGroup GetGroupForModelType(const syncable::ModelType type,
83 const ModelSafeRoutingInfo& routes); 89 const ModelSafeRoutingInfo& routes);
84 90
85 // Maintain the up-to-date state regarding which ModelSafeWorkers exist and 91 // Maintain the up-to-date state regarding which ModelSafeWorkers exist and
86 // which types get routed to which worker. When a sync session begins, it will 92 // which types get routed to which worker. When a sync session begins, it will
87 // snapshot the state at that instant, and will use that for the entire 93 // snapshot the state at that instant, and will use that for the entire
88 // session. This means if a model becomes synced (or unsynced) by the user 94 // session. This means if a model becomes synced (or unsynced) by the user
89 // during a sync session, that session will complete and be unaware of this 95 // during a sync session, that session will complete and be unaware of this
90 // change -- it will only get picked up for the next session. 96 // change -- it will only get picked up for the next session.
91 // TODO(tim): That's really the only way I can make sense of it in the Syncer 97 // TODO(tim): That's really the only way I can make sense of it in the Syncer
(...skipping 11 matching lines...) Expand all
103 virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) = 0; 109 virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) = 0;
104 protected: 110 protected:
105 virtual ~ModelSafeWorkerRegistrar() {} 111 virtual ~ModelSafeWorkerRegistrar() {}
106 private: 112 private:
107 DISALLOW_COPY_AND_ASSIGN(ModelSafeWorkerRegistrar); 113 DISALLOW_COPY_AND_ASSIGN(ModelSafeWorkerRegistrar);
108 }; 114 };
109 115
110 } // namespace browser_sync 116 } // namespace browser_sync
111 117
112 #endif // SYNC_ENGINE_MODEL_SAFE_WORKER_H_ 118 #endif // SYNC_ENGINE_MODEL_SAFE_WORKER_H_
OLDNEW
« no previous file with comments | « sync/engine/apply_updates_command.cc ('k') | sync/engine/model_safe_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698