Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Unified Diff: sync/sessions/sync_session.cc

Issue 11314008: sync: Follow-up to conflict resolution refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/sessions/sync_session.h ('k') | sync/sessions/sync_session_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/sync_session.cc
diff --git a/sync/sessions/sync_session.cc b/sync/sessions/sync_session.cc
index 9be78d89f4cef2277e3ae0fc27da81ae8fd1c56f..7ba93668d2f737354def98c5224f2a1ad9f3ac9e 100644
--- a/sync/sessions/sync_session.cc
+++ b/sync/sessions/sync_session.cc
@@ -145,12 +145,6 @@ void SyncSession::RebaseRoutingInfoWithLatest(
enabled_groups_ = ComputeEnabledGroups(routing_info_, workers_);
}
-void SyncSession::PrepareForAnotherSyncCycle() {
- source_.updates_source =
- sync_pb::GetUpdatesCallerInfo::SYNC_CYCLE_CONTINUATION;
- status_controller_.reset(new StatusController(routing_info_));
-}
-
SyncSessionSnapshot SyncSession::TakeSnapshot() const {
syncable::Directory* dir = context_->directory();
@@ -173,11 +167,9 @@ SyncSessionSnapshot SyncSession::TakeSnapshot() const {
is_share_useable,
initial_sync_ended,
download_progress_markers,
- HasMoreToSync(),
delegate_->IsSyncingCurrentlySilenced(),
status_controller_->num_encryption_conflicts(),
status_controller_->num_hierarchy_conflicts(),
- status_controller_->num_simple_conflicts(),
status_controller_->num_server_conflicts(),
source_,
context_->notifications_enabled(),
@@ -193,30 +185,10 @@ void SyncSession::SendEventNotification(SyncEngineEvent::EventCause cause) {
context()->NotifyListeners(event);
}
-bool SyncSession::HasMoreToSync() const {
- const StatusController* status = status_controller_.get();
- return status->conflicts_resolved();
-}
-
const std::set<ModelSafeGroup>& SyncSession::GetEnabledGroups() const {
return enabled_groups_;
}
-// TODO(rlarocque): Delete this function after refactoring conflict resolution.
-std::set<ModelSafeGroup> SyncSession::GetEnabledGroupsWithConflicts() const {
- const std::set<ModelSafeGroup>& enabled_groups = GetEnabledGroups();
- std::set<ModelSafeGroup> enabled_groups_with_conflicts;
- for (std::set<ModelSafeGroup>::const_iterator it =
- enabled_groups.begin(); it != enabled_groups.end(); ++it) {
- const std::set<syncable::Id>* ids =
- status_controller_->GetUnrestrictedSimpleConflictIds(*it);
- if (ids && ids->size() > 0) {
- enabled_groups_with_conflicts.insert(*it);
- }
- }
- return enabled_groups_with_conflicts;
-}
-
bool SyncSession::DidReachServer() const {
const ModelNeutralState& state = status_controller_->model_neutral_state();
return state.last_get_key_result >= FIRST_SERVER_RETURN_VALUE ||
« no previous file with comments | « sync/sessions/sync_session.h ('k') | sync/sessions/sync_session_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698