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

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

Issue 9323015: [Sync] - In about:sync page display if the first sync after restart has taken place or not. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 const std::string 115 const std::string
116 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT]); 116 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT]);
117 117
118 // An immutable snapshot of state from a SyncSession. Convenient to use as 118 // An immutable snapshot of state from a SyncSession. Convenient to use as
119 // part of notifications as it is inherently thread-safe. 119 // part of notifications as it is inherently thread-safe.
120 struct SyncSessionSnapshot { 120 struct SyncSessionSnapshot {
121 SyncSessionSnapshot( 121 SyncSessionSnapshot(
122 const SyncerStatus& syncer_status, 122 const SyncerStatus& syncer_status,
123 const ErrorCounters& errors, 123 const ErrorCounters& errors,
124 int64 num_server_changes_remaining, 124 int64 num_server_changes_remaining,
125 bool is_share_usable,
126 syncable::ModelTypeSet initial_sync_ended, 125 syncable::ModelTypeSet initial_sync_ended,
127 const std::string 126 const std::string
128 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT], 127 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT],
129 bool more_to_sync, 128 bool more_to_sync,
130 bool is_silenced, 129 bool is_silenced,
131 int64 unsynced_count, 130 int64 unsynced_count,
132 int num_blocking_conflicting_updates, 131 int num_blocking_conflicting_updates,
133 int num_conflicting_updates, 132 int num_conflicting_updates,
134 bool did_commit_items, 133 bool did_commit_items,
135 const SyncSourceInfo& source, 134 const SyncSourceInfo& source,
136 size_t num_entries, 135 size_t num_entries,
137 base::Time sync_start_time, 136 base::Time sync_start_time,
138 bool retry_scheduled); 137 bool retry_scheduled);
139 ~SyncSessionSnapshot(); 138 ~SyncSessionSnapshot();
140 139
141 // Caller takes ownership of the returned dictionary. 140 // Caller takes ownership of the returned dictionary.
142 base::DictionaryValue* ToValue() const; 141 base::DictionaryValue* ToValue() const;
143 142
144 std::string ToString() const; 143 std::string ToString() const;
145 144
146 const SyncerStatus syncer_status; 145 const SyncerStatus syncer_status;
147 const ErrorCounters errors; 146 const ErrorCounters errors;
148 const int64 num_server_changes_remaining; 147 const int64 num_server_changes_remaining;
149 const bool is_share_usable;
150 const syncable::ModelTypeSet initial_sync_ended; 148 const syncable::ModelTypeSet initial_sync_ended;
151 const std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; 149 const std::string download_progress_markers[syncable::MODEL_TYPE_COUNT];
152 const bool has_more_to_sync; 150 const bool has_more_to_sync;
153 const bool is_silenced; 151 const bool is_silenced;
154 const int64 unsynced_count; 152 const int64 unsynced_count;
155 const int num_blocking_conflicting_updates; 153 const int num_blocking_conflicting_updates;
156 const int num_conflicting_updates; 154 const int num_conflicting_updates;
157 const bool did_commit_items; 155 const bool did_commit_items;
158 const SyncSourceInfo source; 156 const SyncSourceInfo source;
159 const size_t num_entries; 157 const size_t num_entries;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 ~PerModelSafeGroupState(); 325 ~PerModelSafeGroupState();
328 326
329 UpdateProgress update_progress; 327 UpdateProgress update_progress;
330 ConflictProgress conflict_progress; 328 ConflictProgress conflict_progress;
331 }; 329 };
332 330
333 } // namespace sessions 331 } // namespace sessions
334 } // namespace browser_sync 332 } // namespace browser_sync
335 333
336 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_ 334 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698