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

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

Issue 10947039: Removed safe worker calculation from SyncScheduler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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
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 // A class representing an attempt to synchronize the local syncable data 5 // A class representing an attempt to synchronize the local syncable data
6 // store with a sync server. A SyncSession instance is passed as a stateful 6 // store with a sync server. A SyncSession instance is passed as a stateful
7 // bundle to and from various SyncerCommands with the goal of converging the 7 // bundle to and from various SyncerCommands with the goal of converging the
8 // client view of data with that of the server. The commands twiddle with 8 // client view of data with that of the server. The commands twiddle with
9 // session status in response to events and hiccups along the way, set and 9 // session status in response to events and hiccups along the way, set and
10 // query session progress with regards to conflict resolution and applying 10 // query session progress with regards to conflict resolution and applying
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 virtual void OnSyncProtocolError( 91 virtual void OnSyncProtocolError(
92 const sessions::SyncSessionSnapshot& snapshot) = 0; 92 const sessions::SyncSessionSnapshot& snapshot) = 0;
93 93
94 protected: 94 protected:
95 virtual ~Delegate() {} 95 virtual ~Delegate() {}
96 }; 96 };
97 97
98 SyncSession(SyncSessionContext* context, 98 SyncSession(SyncSessionContext* context,
99 Delegate* delegate, 99 Delegate* delegate,
100 const SyncSourceInfo& source, 100 const SyncSourceInfo& source,
101 const ModelSafeRoutingInfo& routing_info, 101 const ModelSafeRoutingInfo& routing_info);
102 const std::vector<ModelSafeWorker*>& workers);
103 ~SyncSession(); 102 ~SyncSession();
104 103
105 // Builds a thread-safe and read-only copy of the current session state. 104 // Builds a thread-safe and read-only copy of the current session state.
106 SyncSessionSnapshot TakeSnapshot() const; 105 SyncSessionSnapshot TakeSnapshot() const;
107 106
108 // Builds and sends a snapshot to the session context's listeners. 107 // Builds and sends a snapshot to the session context's listeners.
109 void SendEventNotification(SyncEngineEvent::EventCause cause); 108 void SendEventNotification(SyncEngineEvent::EventCause cause);
110 109
111 // Returns true if this session contains data that should go through the sync 110 // Returns true if this session contains data that should go through the sync
112 // engine again. 111 // engine again.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 241
243 private: 242 private:
244 SyncSession* session_; 243 SyncSession* session_;
245 DISALLOW_COPY_AND_ASSIGN(ScopedSetSessionWriteTransaction); 244 DISALLOW_COPY_AND_ASSIGN(ScopedSetSessionWriteTransaction);
246 }; 245 };
247 246
248 } // namespace sessions 247 } // namespace sessions
249 } // namespace syncer 248 } // namespace syncer
250 249
251 #endif // SYNC_SESSIONS_SYNC_SESSION_H_ 250 #endif // SYNC_SESSIONS_SYNC_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698