| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 if (dir->initial_sync_ended_for_type(type)) | 101 if (dir->initial_sync_ended_for_type(type)) |
| 102 initial_sync_ended.set(type); | 102 initial_sync_ended.set(type); |
| 103 else | 103 else |
| 104 is_share_useable = false; | 104 is_share_useable = false; |
| 105 dir->GetDownloadProgressAsString(type, &download_progress_markers[i]); | 105 dir->GetDownloadProgressAsString(type, &download_progress_markers[i]); |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 | 108 |
| 109 return SyncSessionSnapshot( | 109 return SyncSessionSnapshot( |
| 110 status_controller_->syncer_status(), | 110 status_controller_->syncer_status(), |
| 111 status_controller_->error_counters(), | 111 status_controller_->error(), |
| 112 status_controller_->num_server_changes_remaining(), | 112 status_controller_->num_server_changes_remaining(), |
| 113 is_share_useable, | 113 is_share_useable, |
| 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(), |
| (...skipping 15 matching lines...) Expand all Loading... |
| 137 return ((status->commit_ids().size() < status->unsynced_handles().size()) && | 137 return ((status->commit_ids().size() < status->unsynced_handles().size()) && |
| 138 status->syncer_status().num_successful_commits > 0) || | 138 status->syncer_status().num_successful_commits > 0) || |
| 139 status->conflict_sets_built() || | 139 status->conflict_sets_built() || |
| 140 status->conflicts_resolved(); | 140 status->conflicts_resolved(); |
| 141 // Or, we have conflicting updates, but we're making progress on | 141 // Or, we have conflicting updates, but we're making progress on |
| 142 // resolving them... | 142 // resolving them... |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace sessions | 145 } // namespace sessions |
| 146 } // namespace browser_sync | 146 } // namespace browser_sync |
| OLD | NEW |