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

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

Issue 8919021: [Sync] Rename ModelEnumSet to ModelTypeSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 #include "chrome/browser/sync/sessions/session_state.h" 5 #include "chrome/browser/sync/sessions/session_state.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 consecutive_transient_error_commits); 107 consecutive_transient_error_commits);
108 value->SetInteger("consecutiveErrors", consecutive_errors); 108 value->SetInteger("consecutiveErrors", consecutive_errors);
109 return value; 109 return value;
110 } 110 }
111 111
112 SyncSessionSnapshot::SyncSessionSnapshot( 112 SyncSessionSnapshot::SyncSessionSnapshot(
113 const SyncerStatus& syncer_status, 113 const SyncerStatus& syncer_status,
114 const ErrorCounters& errors, 114 const ErrorCounters& errors,
115 int64 num_server_changes_remaining, 115 int64 num_server_changes_remaining,
116 bool is_share_usable, 116 bool is_share_usable,
117 syncable::ModelEnumSet initial_sync_ended, 117 syncable::ModelTypeSet initial_sync_ended,
118 const std::string 118 const std::string
119 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT], 119 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT],
120 bool more_to_sync, 120 bool more_to_sync,
121 bool is_silenced, 121 bool is_silenced,
122 int64 unsynced_count, 122 int64 unsynced_count,
123 int num_blocking_conflicting_updates, 123 int num_blocking_conflicting_updates,
124 int num_conflicting_updates, 124 int num_conflicting_updates,
125 bool did_commit_items, 125 bool did_commit_items,
126 const SyncSourceInfo& source, 126 const SyncSourceInfo& source,
127 size_t num_entries, 127 size_t num_entries,
(...skipping 24 matching lines...) Expand all
152 152
153 DictionaryValue* SyncSessionSnapshot::ToValue() const { 153 DictionaryValue* SyncSessionSnapshot::ToValue() const {
154 DictionaryValue* value = new DictionaryValue(); 154 DictionaryValue* value = new DictionaryValue();
155 value->Set("syncerStatus", syncer_status.ToValue()); 155 value->Set("syncerStatus", syncer_status.ToValue());
156 value->Set("errors", errors.ToValue()); 156 value->Set("errors", errors.ToValue());
157 // We don't care too much if we lose precision here. 157 // We don't care too much if we lose precision here.
158 value->SetInteger("numServerChangesRemaining", 158 value->SetInteger("numServerChangesRemaining",
159 static_cast<int>(num_server_changes_remaining)); 159 static_cast<int>(num_server_changes_remaining));
160 value->SetBoolean("isShareUsable", is_share_usable); 160 value->SetBoolean("isShareUsable", is_share_usable);
161 value->Set("initialSyncEnded", 161 value->Set("initialSyncEnded",
162 syncable::ModelEnumSetToValue(initial_sync_ended)); 162 syncable::ModelTypeSetToValue(initial_sync_ended));
163 value->Set("downloadProgressMarkers", 163 value->Set("downloadProgressMarkers",
164 DownloadProgressMarkersToValue(download_progress_markers)); 164 DownloadProgressMarkersToValue(download_progress_markers));
165 value->SetBoolean("hasMoreToSync", has_more_to_sync); 165 value->SetBoolean("hasMoreToSync", has_more_to_sync);
166 value->SetBoolean("isSilenced", is_silenced); 166 value->SetBoolean("isSilenced", is_silenced);
167 // We don't care too much if we lose precision here, also. 167 // We don't care too much if we lose precision here, also.
168 value->SetInteger("unsyncedCount", 168 value->SetInteger("unsyncedCount",
169 static_cast<int>(unsynced_count)); 169 static_cast<int>(unsynced_count));
170 value->SetInteger("numBlockingConflictingUpdates", 170 value->SetInteger("numBlockingConflictingUpdates",
171 num_blocking_conflicting_updates); 171 num_blocking_conflicting_updates);
172 value->SetInteger("numConflictingUpdates", num_conflicting_updates); 172 value->SetInteger("numConflictingUpdates", num_conflicting_updates);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 387
388 PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag) 388 PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag)
389 : conflict_progress(dirty_flag) { 389 : conflict_progress(dirty_flag) {
390 } 390 }
391 391
392 PerModelSafeGroupState::~PerModelSafeGroupState() { 392 PerModelSafeGroupState::~PerModelSafeGroupState() {
393 } 393 }
394 394
395 } // namespace sessions 395 } // namespace sessions
396 } // namespace browser_sync 396 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/sessions/session_state.h ('k') | chrome/browser/sync/sessions/session_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698