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

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

Issue 7477004: Simulate transient error and verify exponential backoff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload before commit. Created 9 years, 4 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 | « chrome/browser/sync/retry_verifier.cc ('k') | chrome/browser/sync/sessions/session_state.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) 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 // 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 SyncerStatus(); 63 SyncerStatus();
64 ~SyncerStatus(); 64 ~SyncerStatus();
65 65
66 // Caller takes ownership of the returned dictionary. 66 // Caller takes ownership of the returned dictionary.
67 base::DictionaryValue* ToValue() const; 67 base::DictionaryValue* ToValue() const;
68 68
69 // True when we get such an INVALID_STORE error from the server. 69 // True when we get such an INVALID_STORE error from the server.
70 bool invalid_store; 70 bool invalid_store;
71 // True iff we're stuck. 71 // True iff we're stuck.
72 bool syncer_stuck; 72 bool syncer_stuck;
73 bool syncing; 73 bool sync_in_progress;
74 int num_successful_commits; 74 int num_successful_commits;
75 // This is needed for monitoring extensions activity. 75 // This is needed for monitoring extensions activity.
76 int num_successful_bookmark_commits; 76 int num_successful_bookmark_commits;
77 77
78 // Download event counters. 78 // Download event counters.
79 int num_updates_downloaded_total; 79 int num_updates_downloaded_total;
80 int num_tombstone_updates_downloaded_total; 80 int num_tombstone_updates_downloaded_total;
81 81
82 // If the syncer encountered a MIGRATION_DONE code, these are the types that 82 // If the syncer encountered a MIGRATION_DONE code, these are the types that
83 // the client must now "migrate", by purging and re-downloading all updates. 83 // the client must now "migrate", by purging and re-downloading all updates.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 const syncable::ModelTypeBitSet& initial_sync_ended, 123 const syncable::ModelTypeBitSet& initial_sync_ended,
124 const std::string 124 const std::string
125 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT], 125 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT],
126 bool more_to_sync, 126 bool more_to_sync,
127 bool is_silenced, 127 bool is_silenced,
128 int64 unsynced_count, 128 int64 unsynced_count,
129 int num_blocking_conflicting_updates, 129 int num_blocking_conflicting_updates,
130 int num_conflicting_updates, 130 int num_conflicting_updates,
131 bool did_commit_items, 131 bool did_commit_items,
132 const SyncSourceInfo& source, 132 const SyncSourceInfo& source,
133 size_t num_entries); 133 size_t num_entries,
134 base::Time sync_start_time);
134 ~SyncSessionSnapshot(); 135 ~SyncSessionSnapshot();
135 136
136 // Caller takes ownership of the returned dictionary. 137 // Caller takes ownership of the returned dictionary.
137 base::DictionaryValue* ToValue() const; 138 base::DictionaryValue* ToValue() const;
138 139
139 std::string ToString() const; 140 std::string ToString() const;
140 141
141 const SyncerStatus syncer_status; 142 const SyncerStatus syncer_status;
142 const ErrorCounters errors; 143 const ErrorCounters errors;
143 const int64 num_server_changes_remaining; 144 const int64 num_server_changes_remaining;
144 const bool is_share_usable; 145 const bool is_share_usable;
145 const syncable::ModelTypeBitSet initial_sync_ended; 146 const syncable::ModelTypeBitSet initial_sync_ended;
146 const std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; 147 const std::string download_progress_markers[syncable::MODEL_TYPE_COUNT];
147 const bool has_more_to_sync; 148 const bool has_more_to_sync;
148 const bool is_silenced; 149 const bool is_silenced;
149 const int64 unsynced_count; 150 const int64 unsynced_count;
150 const int num_blocking_conflicting_updates; 151 const int num_blocking_conflicting_updates;
151 const int num_conflicting_updates; 152 const int num_conflicting_updates;
152 const bool did_commit_items; 153 const bool did_commit_items;
153 const SyncSourceInfo source; 154 const SyncSourceInfo source;
154 const size_t num_entries; 155 const size_t num_entries;
156 base::Time sync_start_time;
155 }; 157 };
156 158
157 // Tracks progress of conflicts and their resolution using conflict sets. 159 // Tracks progress of conflicts and their resolution using conflict sets.
158 class ConflictProgress { 160 class ConflictProgress {
159 public: 161 public:
160 explicit ConflictProgress(bool* dirty_flag); 162 explicit ConflictProgress(bool* dirty_flag);
161 ~ConflictProgress(); 163 ~ConflictProgress();
162 // Various iterators, size, and retrieval functions for conflict sets. 164 // Various iterators, size, and retrieval functions for conflict sets.
163 IdToConflictSetMap::const_iterator IdToConflictSetBegin() const; 165 IdToConflictSetMap::const_iterator IdToConflictSetBegin() const;
164 IdToConflictSetMap::const_iterator IdToConflictSetEnd() const; 166 IdToConflictSetMap::const_iterator IdToConflictSetEnd() const;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 ~PerModelSafeGroupState(); 332 ~PerModelSafeGroupState();
331 333
332 UpdateProgress update_progress; 334 UpdateProgress update_progress;
333 ConflictProgress conflict_progress; 335 ConflictProgress conflict_progress;
334 }; 336 };
335 337
336 } // namespace sessions 338 } // namespace sessions
337 } // namespace browser_sync 339 } // namespace browser_sync
338 340
339 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ 341 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/retry_verifier.cc ('k') | chrome/browser/sync/sessions/session_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698