| 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/sync_session.h" | 5 #include "chrome/browser/sync/sessions/sync_session.h" |
| 6 #include "chrome/browser/sync/syncable/directory_manager.h" | 6 #include "chrome/browser/sync/syncable/directory_manager.h" |
| 7 #include "chrome/browser/sync/syncable/model_type.h" | 7 #include "chrome/browser/sync/syncable/model_type.h" |
| 8 | 8 |
| 9 namespace browser_sync { | 9 namespace browser_sync { |
| 10 namespace sessions { | 10 namespace sessions { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 delegate_->IsSyncingCurrentlySilenced(), | 55 delegate_->IsSyncingCurrentlySilenced(), |
| 56 status_controller_->unsynced_handles().size(), | 56 status_controller_->unsynced_handles().size(), |
| 57 status_controller_->TotalNumConflictingItems(), | 57 status_controller_->TotalNumConflictingItems(), |
| 58 status_controller_->did_commit_items()); | 58 status_controller_->did_commit_items()); |
| 59 } | 59 } |
| 60 | 60 |
| 61 SyncSourceInfo SyncSession::TestAndSetSource() { | 61 SyncSourceInfo SyncSession::TestAndSetSource() { |
| 62 SyncSourceInfo old_source = source_; | 62 SyncSourceInfo old_source = source_; |
| 63 source_ = SyncSourceInfo( | 63 source_ = SyncSourceInfo( |
| 64 sync_pb::GetUpdatesCallerInfo::SYNC_CYCLE_CONTINUATION, | 64 sync_pb::GetUpdatesCallerInfo::SYNC_CYCLE_CONTINUATION, |
| 65 source_.second); | 65 source_.types); |
| 66 return old_source; | 66 return old_source; |
| 67 } | 67 } |
| 68 | 68 |
| 69 bool SyncSession::HasMoreToSync() const { | 69 bool SyncSession::HasMoreToSync() const { |
| 70 const StatusController* status = status_controller_.get(); | 70 const StatusController* status = status_controller_.get(); |
| 71 return ((status->commit_ids().size() < status->unsynced_handles().size()) && | 71 return ((status->commit_ids().size() < status->unsynced_handles().size()) && |
| 72 status->syncer_status().num_successful_commits > 0) || | 72 status->syncer_status().num_successful_commits > 0) || |
| 73 status->conflict_sets_built() || | 73 status->conflict_sets_built() || |
| 74 status->conflicts_resolved(); | 74 status->conflicts_resolved(); |
| 75 // Or, we have conflicting updates, but we're making progress on | 75 // Or, we have conflicting updates, but we're making progress on |
| 76 // resolving them... | 76 // resolving them... |
| 77 } | 77 } |
| 78 | 78 |
| 79 } // namespace sessions | 79 } // namespace sessions |
| 80 } // namespace browser_sync | 80 } // namespace browser_sync |
| OLD | NEW |