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

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

Issue 9235040: [Sync] Handle errors during first sync gracefully. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload before commit. Created 8 years, 10 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) 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 // The 'sessions' namespace comprises all the pieces of state that are 5 // The 'sessions' namespace comprises all the pieces of state that are
6 // combined to form a SyncSession instance. In that way, it can be thought of 6 // combined to form a SyncSession instance. In that way, it can be thought of
7 // as an extension of the SyncSession type itself. Session scoping gives 7 // as an extension of the SyncSession type itself. Session scoping gives
8 // context to things like "conflict progress", "update progress", etc, and the 8 // context to things like "conflict progress", "update progress", etc, and the
9 // separation this file provides allows clients to only include the parts they 9 // separation this file provides allows clients to only include the parts they
10 // need rather than the entire session stack. 10 // need rather than the entire session stack.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 const std::string 127 const std::string
128 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT], 128 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT],
129 bool more_to_sync, 129 bool more_to_sync,
130 bool is_silenced, 130 bool is_silenced,
131 int64 unsynced_count, 131 int64 unsynced_count,
132 int num_blocking_conflicting_updates, 132 int num_blocking_conflicting_updates,
133 int num_conflicting_updates, 133 int num_conflicting_updates,
134 bool did_commit_items, 134 bool did_commit_items,
135 const SyncSourceInfo& source, 135 const SyncSourceInfo& source,
136 size_t num_entries, 136 size_t num_entries,
137 base::Time sync_start_time); 137 base::Time sync_start_time,
138 bool retry_scheduled);
138 ~SyncSessionSnapshot(); 139 ~SyncSessionSnapshot();
139 140
140 // Caller takes ownership of the returned dictionary. 141 // Caller takes ownership of the returned dictionary.
141 base::DictionaryValue* ToValue() const; 142 base::DictionaryValue* ToValue() const;
142 143
143 std::string ToString() const; 144 std::string ToString() const;
144 145
145 const SyncerStatus syncer_status; 146 const SyncerStatus syncer_status;
146 const ErrorCounters errors; 147 const ErrorCounters errors;
147 const int64 num_server_changes_remaining; 148 const int64 num_server_changes_remaining;
148 const bool is_share_usable; 149 const bool is_share_usable;
149 const syncable::ModelTypeSet initial_sync_ended; 150 const syncable::ModelTypeSet initial_sync_ended;
150 const std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; 151 const std::string download_progress_markers[syncable::MODEL_TYPE_COUNT];
151 const bool has_more_to_sync; 152 const bool has_more_to_sync;
152 const bool is_silenced; 153 const bool is_silenced;
153 const int64 unsynced_count; 154 const int64 unsynced_count;
154 const int num_blocking_conflicting_updates; 155 const int num_blocking_conflicting_updates;
155 const int num_conflicting_updates; 156 const int num_conflicting_updates;
156 const bool did_commit_items; 157 const bool did_commit_items;
157 const SyncSourceInfo source; 158 const SyncSourceInfo source;
158 const size_t num_entries; 159 const size_t num_entries;
159 base::Time sync_start_time; 160 base::Time sync_start_time;
161 const bool retry_scheduled;
160 }; 162 };
161 163
162 // Tracks progress of conflicts and their resolution using conflict sets. 164 // Tracks progress of conflicts and their resolution using conflict sets.
163 class ConflictProgress { 165 class ConflictProgress {
164 public: 166 public:
165 explicit ConflictProgress(bool* dirty_flag); 167 explicit ConflictProgress(bool* dirty_flag);
166 ~ConflictProgress(); 168 ~ConflictProgress();
167 // Various iterators, size, and retrieval functions for conflict sets. 169 // Various iterators, size, and retrieval functions for conflict sets.
168 IdToConflictSetMap::const_iterator IdToConflictSetBegin() const; 170 IdToConflictSetMap::const_iterator IdToConflictSetBegin() const;
169 IdToConflictSetMap::const_iterator IdToConflictSetEnd() const; 171 IdToConflictSetMap::const_iterator IdToConflictSetEnd() const;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 ~PerModelSafeGroupState(); 331 ~PerModelSafeGroupState();
330 332
331 UpdateProgress update_progress; 333 UpdateProgress update_progress;
332 ConflictProgress conflict_progress; 334 ConflictProgress conflict_progress;
333 }; 335 };
334 336
335 } // namespace sessions 337 } // namespace sessions
336 } // namespace browser_sync 338 } // namespace browser_sync
337 339
338 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ 340 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/sessions/session_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698