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

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

Issue 7861013: Fix the false-positive detection of commit errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 const std::vector<ModelSafeWorker*>& workers); 101 const std::vector<ModelSafeWorker*>& workers);
102 ~SyncSession(); 102 ~SyncSession();
103 103
104 // 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.
105 SyncSessionSnapshot TakeSnapshot() const; 105 SyncSessionSnapshot TakeSnapshot() const;
106 106
107 // Returns true if this session contains data that should go through the sync 107 // Returns true if this session contains data that should go through the sync
108 // engine again. 108 // engine again.
109 bool HasMoreToSync() const; 109 bool HasMoreToSync() const;
110 110
111 // Returns true if this session experienced an error that prevented it from
112 // making progress.
113 bool WasUnableToMakeProgress() const;
tim (not reviewing) 2011/09/20 20:32:12 FailedToMake[Forward]Progress?
114
111 // Collects all state pertaining to how and why |s| originated and unions it 115 // Collects all state pertaining to how and why |s| originated and unions it
112 // with corresponding state in |this|, leaving |s| unchanged. Allows |this| 116 // with corresponding state in |this|, leaving |s| unchanged. Allows |this|
113 // to take on the responsibilities |s| had (e.g. certain data types) in the 117 // to take on the responsibilities |s| had (e.g. certain data types) in the
114 // next SyncShare operation using |this|, rather than needed two separate 118 // next SyncShare operation using |this|, rather than needed two separate
115 // sessions. 119 // sessions.
116 void Coalesce(const SyncSession& session); 120 void Coalesce(const SyncSession& session);
117 121
118 // Compares the routing_info_, workers and payload map with the passed in 122 // Compares the routing_info_, workers and payload map with the passed in
119 // session. Purges types from the above 3 which are not in session. Useful 123 // session. Purges types from the above 3 which are not in session. Useful
120 // to update the sync session when the user has disabled some types from 124 // to update the sync session when the user has disabled some types from
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 201
198 private: 202 private:
199 SyncSession* session_; 203 SyncSession* session_;
200 DISALLOW_COPY_AND_ASSIGN(ScopedSetSessionWriteTransaction); 204 DISALLOW_COPY_AND_ASSIGN(ScopedSetSessionWriteTransaction);
201 }; 205 };
202 206
203 } // namespace sessions 207 } // namespace sessions
204 } // namespace browser_sync 208 } // namespace browser_sync
205 209
206 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_H_ 210 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698