OLD | NEW |
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, |
128 base::Time sync_start_time) | 128 base::Time sync_start_time, |
| 129 browser_sync::sessions::SyncError sync_error) |
129 : syncer_status(syncer_status), | 130 : syncer_status(syncer_status), |
130 errors(errors), | 131 errors(errors), |
131 num_server_changes_remaining(num_server_changes_remaining), | 132 num_server_changes_remaining(num_server_changes_remaining), |
132 is_share_usable(is_share_usable), | 133 is_share_usable(is_share_usable), |
133 initial_sync_ended(initial_sync_ended), | 134 initial_sync_ended(initial_sync_ended), |
134 download_progress_markers(), | 135 download_progress_markers(), |
135 has_more_to_sync(more_to_sync), | 136 has_more_to_sync(more_to_sync), |
136 is_silenced(is_silenced), | 137 is_silenced(is_silenced), |
137 unsynced_count(unsynced_count), | 138 unsynced_count(unsynced_count), |
138 num_blocking_conflicting_updates(num_blocking_conflicting_updates), | 139 num_blocking_conflicting_updates(num_blocking_conflicting_updates), |
139 num_conflicting_updates(num_conflicting_updates), | 140 num_conflicting_updates(num_conflicting_updates), |
140 did_commit_items(did_commit_items), | 141 did_commit_items(did_commit_items), |
141 source(source), | 142 source(source), |
142 num_entries(num_entries), | 143 num_entries(num_entries), |
143 sync_start_time(sync_start_time) { | 144 sync_start_time(sync_start_time), |
| 145 sync_error(sync_error) { |
144 for (int i = syncable::FIRST_REAL_MODEL_TYPE; | 146 for (int i = syncable::FIRST_REAL_MODEL_TYPE; |
145 i < syncable::MODEL_TYPE_COUNT; ++i) { | 147 i < syncable::MODEL_TYPE_COUNT; ++i) { |
146 const_cast<std::string&>(this->download_progress_markers[i]).assign( | 148 const_cast<std::string&>(this->download_progress_markers[i]).assign( |
147 download_progress_markers[i]); | 149 download_progress_markers[i]); |
148 } | 150 } |
149 } | 151 } |
150 | 152 |
151 SyncSessionSnapshot::~SyncSessionSnapshot() {} | 153 SyncSessionSnapshot::~SyncSessionSnapshot() {} |
152 | 154 |
153 DictionaryValue* SyncSessionSnapshot::ToValue() const { | 155 DictionaryValue* SyncSessionSnapshot::ToValue() const { |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 } | 379 } |
378 } | 380 } |
379 return false; | 381 return false; |
380 } | 382 } |
381 | 383 |
382 AllModelTypeState::AllModelTypeState(bool* dirty_flag) | 384 AllModelTypeState::AllModelTypeState(bool* dirty_flag) |
383 : unsynced_handles(dirty_flag), | 385 : unsynced_handles(dirty_flag), |
384 syncer_status(dirty_flag), | 386 syncer_status(dirty_flag), |
385 error_counters(dirty_flag), | 387 error_counters(dirty_flag), |
386 num_server_changes_remaining(dirty_flag, 0), | 388 num_server_changes_remaining(dirty_flag, 0), |
387 commit_set(ModelSafeRoutingInfo()) { | 389 commit_set(ModelSafeRoutingInfo()), |
| 390 sync_error(dirty_flag) { |
388 } | 391 } |
389 | 392 |
390 AllModelTypeState::~AllModelTypeState() {} | 393 AllModelTypeState::~AllModelTypeState() {} |
391 | 394 |
392 PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag) | 395 PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag) |
393 : conflict_progress(dirty_flag) { | 396 : conflict_progress(dirty_flag) { |
394 } | 397 } |
395 | 398 |
396 PerModelSafeGroupState::~PerModelSafeGroupState() { | 399 PerModelSafeGroupState::~PerModelSafeGroupState() { |
397 } | 400 } |
398 | 401 |
399 } // namespace sessions | 402 } // namespace sessions |
400 } // namespace browser_sync | 403 } // namespace browser_sync |
OLD | NEW |