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/sync_session.h" | 5 #include "chrome/browser/sync/sessions/sync_session.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "chrome/browser/sync/syncable/directory_manager.h" | 9 #include "chrome/browser/sync/syncable/directory_manager.h" |
10 #include "chrome/browser/sync/syncable/model_type.h" | 10 #include "chrome/browser/sync/syncable/model_type.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 initial_sync_ended, | 114 initial_sync_ended, |
115 download_progress_markers, | 115 download_progress_markers, |
116 HasMoreToSync(), | 116 HasMoreToSync(), |
117 delegate_->IsSyncingCurrentlySilenced(), | 117 delegate_->IsSyncingCurrentlySilenced(), |
118 status_controller_->unsynced_handles().size(), | 118 status_controller_->unsynced_handles().size(), |
119 status_controller_->TotalNumBlockingConflictingItems(), | 119 status_controller_->TotalNumBlockingConflictingItems(), |
120 status_controller_->TotalNumConflictingItems(), | 120 status_controller_->TotalNumConflictingItems(), |
121 status_controller_->did_commit_items(), | 121 status_controller_->did_commit_items(), |
122 source_, | 122 source_, |
123 dir->GetEntriesCount(), | 123 dir->GetEntriesCount(), |
124 status_controller_->sync_start_time()); | 124 status_controller_->sync_start_time(), |
| 125 status_controller_->sync_protocol_error()); |
125 } | 126 } |
126 | 127 |
127 SyncSourceInfo SyncSession::TestAndSetSource() { | 128 SyncSourceInfo SyncSession::TestAndSetSource() { |
128 SyncSourceInfo old_source = source_; | 129 SyncSourceInfo old_source = source_; |
129 source_ = SyncSourceInfo( | 130 source_ = SyncSourceInfo( |
130 sync_pb::GetUpdatesCallerInfo::SYNC_CYCLE_CONTINUATION, | 131 sync_pb::GetUpdatesCallerInfo::SYNC_CYCLE_CONTINUATION, |
131 source_.types); | 132 source_.types); |
132 return old_source; | 133 return old_source; |
133 } | 134 } |
134 | 135 |
135 bool SyncSession::HasMoreToSync() const { | 136 bool SyncSession::HasMoreToSync() const { |
136 const StatusController* status = status_controller_.get(); | 137 const StatusController* status = status_controller_.get(); |
137 return ((status->commit_ids().size() < status->unsynced_handles().size()) && | 138 return ((status->commit_ids().size() < status->unsynced_handles().size()) && |
138 status->syncer_status().num_successful_commits > 0) || | 139 status->syncer_status().num_successful_commits > 0) || |
139 status->conflict_sets_built() || | 140 status->conflict_sets_built() || |
140 status->conflicts_resolved(); | 141 status->conflicts_resolved(); |
141 // Or, we have conflicting updates, but we're making progress on | 142 // Or, we have conflicting updates, but we're making progress on |
142 // resolving them... | 143 // resolving them... |
143 } | 144 } |
144 | 145 |
145 } // namespace sessions | 146 } // namespace sessions |
146 } // namespace browser_sync | 147 } // namespace browser_sync |
OLD | NEW |