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 | 7 |
8 namespace browser_sync { | 8 namespace browser_sync { |
9 namespace sessions { | 9 namespace sessions { |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource old_source = source_; | 46 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource old_source = source_; |
47 set_source(sync_pb::GetUpdatesCallerInfo::SYNC_CYCLE_CONTINUATION); | 47 set_source(sync_pb::GetUpdatesCallerInfo::SYNC_CYCLE_CONTINUATION); |
48 return old_source; | 48 return old_source; |
49 } | 49 } |
50 | 50 |
51 bool SyncSession::HasMoreToSync() const { | 51 bool SyncSession::HasMoreToSync() const { |
52 const StatusController* status = status_controller_.get(); | 52 const StatusController* status = status_controller_.get(); |
53 return ((status->commit_ids().size() < status->unsynced_handles().size()) && | 53 return ((status->commit_ids().size() < status->unsynced_handles().size()) && |
54 status->syncer_status().num_successful_commits > 0) || | 54 status->syncer_status().num_successful_commits > 0) || |
55 status->conflict_sets_built() || | 55 status->conflict_sets_built() || |
56 status->conflicts_resolved() || | 56 status->conflicts_resolved(); |
57 // Or, we have conflicting updates, but we're making progress on | 57 // Or, we have conflicting updates, but we're making progress on |
58 // resolving them... | 58 // resolving them... |
59 !status->got_zero_updates() || | 59 } |
60 status->got_new_timestamp(); | |
61 } | |
62 | 60 |
63 } // namespace sessions | 61 } // namespace sessions |
64 } // namespace browser_sync | 62 } // namespace browser_sync |
OLD | NEW |