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

Side by Side Diff: sync/sessions/sync_session_context.h

Issue 14046031: Worker changes to prepare for lock-free shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 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 // SyncSessionContext encapsulates the contextual information and engine 5 // SyncSessionContext encapsulates the contextual information and engine
6 // components specific to a SyncSession. A context is accessible via 6 // components specific to a SyncSession. A context is accessible via
7 // a SyncSession so that session SyncerCommands and parts of the engine have 7 // a SyncSession so that session SyncerCommands and parts of the engine have
8 // a convenient way to access other parts. In this way it can be thought of as 8 // a convenient way to access other parts. In this way it can be thought of as
9 // the surrounding environment for the SyncSession. The components of this 9 // the surrounding environment for the SyncSession. The components of this
10 // environment are either valid or not valid for the entire context lifetime, 10 // environment are either valid or not valid for the entire context lifetime,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 70
71 const ModelSafeRoutingInfo& routing_info() const { 71 const ModelSafeRoutingInfo& routing_info() const {
72 return routing_info_; 72 return routing_info_;
73 } 73 }
74 74
75 void set_routing_info(const ModelSafeRoutingInfo& routing_info) { 75 void set_routing_info(const ModelSafeRoutingInfo& routing_info) {
76 routing_info_ = routing_info; 76 routing_info_ = routing_info;
77 } 77 }
78 78
79 const std::vector<ModelSafeWorker*> workers() const { 79 const std::vector<scoped_refptr<ModelSafeWorker> >& workers() const {
80 return workers_; 80 return workers_;
81 } 81 }
82 82
83 ExtensionsActivityMonitor* extensions_monitor() { 83 ExtensionsActivityMonitor* extensions_monitor() {
84 return extensions_activity_monitor_; 84 return extensions_activity_monitor_;
85 } 85 }
86 86
87 ThrottledDataTypeTracker* throttled_data_type_tracker() { 87 ThrottledDataTypeTracker* throttled_data_type_tracker() {
88 return throttled_data_type_tracker_; 88 return throttled_data_type_tracker_;
89 } 89 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 ObserverList<SyncEngineEventListener> listeners_; 144 ObserverList<SyncEngineEventListener> listeners_;
145 145
146 ServerConnectionManager* const connection_manager_; 146 ServerConnectionManager* const connection_manager_;
147 syncable::Directory* const directory_; 147 syncable::Directory* const directory_;
148 148
149 // A cached copy of SyncBackendRegistrar's routing info. 149 // A cached copy of SyncBackendRegistrar's routing info.
150 // Must be updated manually when SBR's state is modified. 150 // Must be updated manually when SBR's state is modified.
151 ModelSafeRoutingInfo routing_info_; 151 ModelSafeRoutingInfo routing_info_;
152 152
153 // The set of ModelSafeWorkers. Used to execute tasks of various threads. 153 // The set of ModelSafeWorkers. Used to execute tasks of various threads.
154 const std::vector<ModelSafeWorker*> workers_; 154 std::vector<scoped_refptr<ModelSafeWorker> > workers_;
155 155
156 // We use this to stuff extensions activity into CommitMessages so the server 156 // We use this to stuff extensions activity into CommitMessages so the server
157 // can correlate commit traffic with extension-related bookmark mutations. 157 // can correlate commit traffic with extension-related bookmark mutations.
158 ExtensionsActivityMonitor* extensions_activity_monitor_; 158 ExtensionsActivityMonitor* extensions_activity_monitor_;
159 159
160 // Kept up to date with talk events to determine whether notifications are 160 // Kept up to date with talk events to determine whether notifications are
161 // enabled. True only if the notification channel is authorized and open. 161 // enabled. True only if the notification channel is authorized and open.
162 bool notifications_enabled_; 162 bool notifications_enabled_;
163 163
164 // The name of the account being synced. 164 // The name of the account being synced.
(...skipping 24 matching lines...) Expand all
189 // prevent us from receiving notifications of changes we make ourselves. 189 // prevent us from receiving notifications of changes we make ourselves.
190 const std::string invalidator_client_id_; 190 const std::string invalidator_client_id_;
191 191
192 DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); 192 DISALLOW_COPY_AND_ASSIGN(SyncSessionContext);
193 }; 193 };
194 194
195 } // namespace sessions 195 } // namespace sessions
196 } // namespace syncer 196 } // namespace syncer
197 197
198 #endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ 198 #endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
OLDNEW
« no previous file with comments | « sync/internal_api/test/test_internal_components_factory.cc ('k') | sync/sessions/sync_session_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698