diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-06 00:20:23 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-06 00:20:23 +0000 |
commit | ff390b8451249f70326d38fe12ed1166f26164d2 (patch) | |
tree | ae0854550e3e0e6bdc12c49f28530082c97aa1b0 /sync/engine/resolve_conflicts_command.cc | |
parent | 574eedcdeb1f43a7f26f647f2f4c87cb9cc73c35 (diff) | |
download | chromium_src-ff390b8451249f70326d38fe12ed1166f26164d2.zip chromium_src-ff390b8451249f70326d38fe12ed1166f26164d2.tar.gz chromium_src-ff390b8451249f70326d38fe12ed1166f26164d2.tar.bz2 |
sync: Remove ConflictProgress
This change removes the ConflictProgress struct from the
PerModelSafeGroupState. The struct was intended to pass state between
the update application and conflict resolution commands. This part of
its functionality has been replaced with a vector of simple conflict
item IDs.
The ConflictProgress struct also had an important role to play in stats
gathering and unit tests. To replace it, the update applicator has been
updated to store its counts directly in the StatusController. Unlike
ConflictProgress, this state is not thread-local. That's acceptable
because we can guarantee it will only be read or written by one thread
at a time and those threads use appropriate thread-safety mechanisms to
transfer control to each other.
This change is another step towards merging update application and
conflict resolution.
BUG=147681
Review URL: https://chromiumcodereview.appspot.com/11049002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160530 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/engine/resolve_conflicts_command.cc')
-rw-r--r-- | sync/engine/resolve_conflicts_command.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sync/engine/resolve_conflicts_command.cc b/sync/engine/resolve_conflicts_command.cc index 3adfa9d..5b7f5e2 100644 --- a/sync/engine/resolve_conflicts_command.cc +++ b/sync/engine/resolve_conflicts_command.cc @@ -27,14 +27,14 @@ SyncerError ResolveConflictsCommand::ModelChangingExecuteImpl( syncable::Directory* dir = session->context()->directory(); sessions::StatusController* status = session->mutable_status_controller(); - const sessions::ConflictProgress* progress = status->conflict_progress(); - if (!progress) - return SYNCER_OK; // Nothing to do. + const std::set<syncable::Id>* simple_conflict_ids = + status->simple_conflict_ids(); + syncable::WriteTransaction trans(FROM_HERE, syncable::SYNCER, dir); const Cryptographer* cryptographer = dir->GetCryptographer(&trans); status->update_conflicts_resolved( resolver->ResolveConflicts(&trans, cryptographer, - progress->SimpleConflictingItems(), status)); + *simple_conflict_ids, status)); return SYNCER_OK; } |