OLD | NEW |
---|---|
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 #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 "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/browser/sync/syncable/directory_manager.h" | 10 #include "chrome/browser/sync/syncable/directory_manager.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
153 return SyncSessionSnapshot( | 153 return SyncSessionSnapshot( |
154 status_controller_->syncer_status(), | 154 status_controller_->syncer_status(), |
155 status_controller_->error(), | 155 status_controller_->error(), |
156 status_controller_->num_server_changes_remaining(), | 156 status_controller_->num_server_changes_remaining(), |
157 is_share_useable, | 157 is_share_useable, |
158 initial_sync_ended, | 158 initial_sync_ended, |
159 download_progress_markers, | 159 download_progress_markers, |
160 HasMoreToSync(), | 160 HasMoreToSync(), |
161 delegate_->IsSyncingCurrentlySilenced(), | 161 delegate_->IsSyncingCurrentlySilenced(), |
162 status_controller_->unsynced_handles().size(), | 162 status_controller_->unsynced_handles().size(), |
163 status_controller_->TotalNumBlockingConflictingItems(), | 163 status_controller_->TotalNumBlockingConflictingItems(), |
Nicolas Zea
2012/02/02 21:53:41
numblocking -> numresolvable
rlarocque
2012/02/03 22:31:15
Done, s/resolvable/simple/.
| |
164 status_controller_->TotalNumConflictingItems(), | 164 status_controller_->TotalNumConflictingItems(), |
165 status_controller_->did_commit_items(), | 165 status_controller_->did_commit_items(), |
166 source_, | 166 source_, |
167 dir->GetEntriesCount(), | 167 dir->GetEntriesCount(), |
168 status_controller_->sync_start_time(), | 168 status_controller_->sync_start_time(), |
169 !Succeeded()); | 169 !Succeeded()); |
170 } | 170 } |
171 | 171 |
172 void SyncSession::SendEventNotification(SyncEngineEvent::EventCause cause) { | 172 void SyncSession::SendEventNotification(SyncEngineEvent::EventCause cause) { |
173 SyncEngineEvent event(cause); | 173 SyncEngineEvent event(cause); |
(...skipping 26 matching lines...) Expand all Loading... | |
200 } | 200 } |
201 | 201 |
202 std::set<ModelSafeGroup> SyncSession::GetEnabledGroupsWithConflicts() const { | 202 std::set<ModelSafeGroup> SyncSession::GetEnabledGroupsWithConflicts() const { |
203 const std::set<ModelSafeGroup>& enabled_groups = GetEnabledGroups(); | 203 const std::set<ModelSafeGroup>& enabled_groups = GetEnabledGroups(); |
204 std::set<ModelSafeGroup> enabled_groups_with_conflicts; | 204 std::set<ModelSafeGroup> enabled_groups_with_conflicts; |
205 for (std::set<ModelSafeGroup>::const_iterator it = | 205 for (std::set<ModelSafeGroup>::const_iterator it = |
206 enabled_groups.begin(); it != enabled_groups.end(); ++it) { | 206 enabled_groups.begin(); it != enabled_groups.end(); ++it) { |
207 const sessions::ConflictProgress* conflict_progress = | 207 const sessions::ConflictProgress* conflict_progress = |
208 status_controller_->GetUnrestrictedConflictProgress(*it); | 208 status_controller_->GetUnrestrictedConflictProgress(*it); |
209 if (conflict_progress && | 209 if (conflict_progress && |
210 (conflict_progress->ConflictingItemsBegin() != | 210 (conflict_progress->SimpleConflictingItemsBegin() != |
211 conflict_progress->ConflictingItemsEnd())) { | 211 conflict_progress->SimpleConflictingItemsEnd())) { |
212 enabled_groups_with_conflicts.insert(*it); | 212 enabled_groups_with_conflicts.insert(*it); |
213 } | 213 } |
214 } | 214 } |
215 return enabled_groups_with_conflicts; | 215 return enabled_groups_with_conflicts; |
216 } | 216 } |
217 | 217 |
218 std::set<ModelSafeGroup> | 218 std::set<ModelSafeGroup> |
219 SyncSession::GetEnabledGroupsWithVerifiedUpdates() const { | 219 SyncSession::GetEnabledGroupsWithVerifiedUpdates() const { |
220 const std::set<ModelSafeGroup>& enabled_groups = GetEnabledGroups(); | 220 const std::set<ModelSafeGroup>& enabled_groups = GetEnabledGroups(); |
221 std::set<ModelSafeGroup> enabled_groups_with_verified_updates; | 221 std::set<ModelSafeGroup> enabled_groups_with_verified_updates; |
(...skipping 29 matching lines...) Expand all Loading... | |
251 IsError(status_controller_->error().last_post_commit_result); | 251 IsError(status_controller_->error().last_post_commit_result); |
252 const bool process_commit_response_error = | 252 const bool process_commit_response_error = |
253 IsError(status_controller_->error().last_process_commit_response_result); | 253 IsError(status_controller_->error().last_process_commit_response_result); |
254 return !download_updates_error | 254 return !download_updates_error |
255 && !post_commit_error | 255 && !post_commit_error |
256 && !process_commit_response_error; | 256 && !process_commit_response_error; |
257 } | 257 } |
258 | 258 |
259 } // namespace sessions | 259 } // namespace sessions |
260 } // namespace browser_sync | 260 } // namespace browser_sync |
OLD | NEW |