| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 using std::set; | 10 using std::set; |
| 11 using std::vector; | 11 using std::vector; |
| 12 | 12 |
| 13 namespace browser_sync { | 13 namespace browser_sync { |
| 14 namespace sessions { | 14 namespace sessions { |
| 15 | 15 |
| 16 SyncSessionSnapshot::SyncSessionSnapshot( | 16 SyncSessionSnapshot::SyncSessionSnapshot( |
| 17 const SyncerStatus& syncer_status, | 17 const SyncerStatus& syncer_status, |
| 18 const ErrorCounters& errors, | 18 const ErrorCounters& errors, |
| 19 int64 num_server_changes_remaining, | 19 int64 num_server_changes_remaining, |
| 20 int64 max_local_timestamp, | |
| 21 bool is_share_usable, | 20 bool is_share_usable, |
| 22 const syncable::ModelTypeBitSet& initial_sync_ended, | 21 const syncable::ModelTypeBitSet& initial_sync_ended, |
| 22 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT], |
| 23 bool more_to_sync, | 23 bool more_to_sync, |
| 24 bool is_silenced, | 24 bool is_silenced, |
| 25 int64 unsynced_count, | 25 int64 unsynced_count, |
| 26 int num_conflicting_updates, | 26 int num_conflicting_updates, |
| 27 bool did_commit_items) | 27 bool did_commit_items) |
| 28 : syncer_status(syncer_status), | 28 : syncer_status(syncer_status), |
| 29 errors(errors), | 29 errors(errors), |
| 30 num_server_changes_remaining(num_server_changes_remaining), | 30 num_server_changes_remaining(num_server_changes_remaining), |
| 31 max_local_timestamp(max_local_timestamp), | |
| 32 is_share_usable(is_share_usable), | 31 is_share_usable(is_share_usable), |
| 33 initial_sync_ended(initial_sync_ended), | 32 initial_sync_ended(initial_sync_ended), |
| 33 download_progress_markers(), |
| 34 has_more_to_sync(more_to_sync), | 34 has_more_to_sync(more_to_sync), |
| 35 is_silenced(is_silenced), | 35 is_silenced(is_silenced), |
| 36 unsynced_count(unsynced_count), | 36 unsynced_count(unsynced_count), |
| 37 num_conflicting_updates(num_conflicting_updates), | 37 num_conflicting_updates(num_conflicting_updates), |
| 38 did_commit_items(did_commit_items) { | 38 did_commit_items(did_commit_items) { |
| 39 for (int i = 0; i < syncable::MODEL_TYPE_COUNT; ++i) { |
| 40 const_cast<std::string&>(this->download_progress_markers[i]).assign( |
| 41 download_progress_markers[i]); |
| 42 } |
| 39 } | 43 } |
| 40 | 44 |
| 41 SyncSessionSnapshot::~SyncSessionSnapshot() {} | 45 SyncSessionSnapshot::~SyncSessionSnapshot() {} |
| 42 | 46 |
| 43 ConflictProgress::ConflictProgress(bool* dirty_flag) : dirty_(dirty_flag) {} | 47 ConflictProgress::ConflictProgress(bool* dirty_flag) : dirty_(dirty_flag) {} |
| 44 | 48 |
| 45 ConflictProgress::~ConflictProgress() { | 49 ConflictProgress::~ConflictProgress() { |
| 46 CleanupSets(); | 50 CleanupSets(); |
| 47 } | 51 } |
| 48 | 52 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 | 235 |
| 232 AllModelTypeState::~AllModelTypeState() {} | 236 AllModelTypeState::~AllModelTypeState() {} |
| 233 | 237 |
| 234 PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag) | 238 PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag) |
| 235 : conflict_progress(dirty_flag) { | 239 : conflict_progress(dirty_flag) { |
| 236 } | 240 } |
| 237 | 241 |
| 238 PerModelSafeGroupState::~PerModelSafeGroupState() { | 242 PerModelSafeGroupState::~PerModelSafeGroupState() { |
| 239 } | 243 } |
| 240 | 244 |
| 241 PerModelTypeState::PerModelTypeState(bool* dirty_flag) | 245 PerModelTypeState::PerModelTypeState(bool* dirty_flag) { |
| 242 : current_download_timestamp(dirty_flag, 0) { | |
| 243 } | 246 } |
| 244 | 247 |
| 245 PerModelTypeState::~PerModelTypeState() { | 248 PerModelTypeState::~PerModelTypeState() { |
| 246 } | 249 } |
| 247 | 250 |
| 248 } // namespace sessions | 251 } // namespace sessions |
| 249 } // namespace browser_sync | 252 } // namespace browser_sync |
| OLD | NEW |