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

Unified Diff: sync/engine/syncer.cc

Issue 10933075: FYI: Remove PerModelSafeGroupState + move ConflictResolution (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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/engine/syncer.h ('k') | sync/engine/syncer_proto_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer.cc
diff --git a/sync/engine/syncer.cc b/sync/engine/syncer.cc
index d8d2ce3a8e80f69c5336f355ff5219c17f020af3..00c2531e030d337d7c7b1e66cda5e1d4ed0ee46b 100644
--- a/sync/engine/syncer.cc
+++ b/sync/engine/syncer.cc
@@ -19,11 +19,9 @@
#include "sync/engine/net/server_connection_manager.h"
#include "sync/engine/process_commit_response_command.h"
#include "sync/engine/process_updates_command.h"
-#include "sync/engine/resolve_conflicts_command.h"
#include "sync/engine/store_timestamps_command.h"
#include "sync/engine/syncer_types.h"
#include "sync/engine/throttled_data_type_tracker.h"
-#include "sync/engine/verify_updates_command.h"
#include "sync/syncable/mutable_entry.h"
#include "sync/syncable/syncable-inl.h"
@@ -36,7 +34,6 @@ namespace syncer {
using sessions::ScopedSessionContextConflictResolver;
using sessions::StatusController;
using sessions::SyncSession;
-using sessions::ConflictProgress;
using syncable::IS_UNAPPLIED_UPDATE;
using syncable::SERVER_CTIME;
using syncable::SERVER_IS_DEL;
@@ -60,8 +57,6 @@ const char* SyncerStepToString(const SyncerStep step)
ENUM_CASE(STORE_TIMESTAMPS);
ENUM_CASE(APPLY_UPDATES);
ENUM_CASE(COMMIT);
- ENUM_CASE(RESOLVE_CONFLICTS);
- ENUM_CASE(APPLY_UPDATES_TO_RESOLVE_CONFLICTS);
ENUM_CASE(SYNCER_END);
}
NOTREACHED();
@@ -123,12 +118,6 @@ void Syncer::SyncShare(sessions::SyncSession* session,
}
case PROCESS_CLIENT_COMMAND: {
ProcessClientCommand(session);
- next_step = VERIFY_UPDATES;
- break;
- }
- case VERIFY_UPDATES: {
- VerifyUpdatesCommand verify_updates;
- verify_updates.Execute(session);
next_step = PROCESS_UPDATES;
break;
}
@@ -178,43 +167,6 @@ void Syncer::SyncShare(sessions::SyncSession* session,
case COMMIT: {
session->mutable_status_controller()->set_commit_result(
BuildAndPostCommits(this, session));
- next_step = RESOLVE_CONFLICTS;
- break;
- }
- case RESOLVE_CONFLICTS: {
- StatusController* status = session->mutable_status_controller();
- status->reset_conflicts_resolved();
- ResolveConflictsCommand resolve_conflicts_command;
- resolve_conflicts_command.Execute(session);
-
- // Has ConflictingUpdates includes both resolvable and unresolvable
- // conflicts. If we have either, we want to attempt to reapply.
- if (status->HasConflictingUpdates())
- next_step = APPLY_UPDATES_TO_RESOLVE_CONFLICTS;
- else
- next_step = SYNCER_END;
- break;
- }
- case APPLY_UPDATES_TO_RESOLVE_CONFLICTS: {
- StatusController* status = session->mutable_status_controller();
- DVLOG(1) << "Applying updates to resolve conflicts";
- ApplyUpdatesCommand apply_updates;
-
- // We only care to resolve conflicts again if we made progress on the
- // simple conflicts.
- int before_blocking_conflicting_updates =
- status->TotalNumSimpleConflictingItems();
- apply_updates.Execute(session);
- int after_blocking_conflicting_updates =
- status->TotalNumSimpleConflictingItems();
- // If the following call sets the conflicts_resolved value to true,
- // SyncSession::HasMoreToSync() will send us into another sync cycle
- // after this one completes.
- //
- // TODO(rlarocque, 109072): Make conflict resolution not require
- // extra sync cycles/GetUpdates.
- status->update_conflicts_resolved(before_blocking_conflicting_updates >
- after_blocking_conflicting_updates);
next_step = SYNCER_END;
break;
}
« no previous file with comments | « sync/engine/syncer.h ('k') | sync/engine/syncer_proto_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698