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

Unified Diff: sync/engine/conflict_resolver.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/conflict_resolver.h ('k') | sync/engine/process_commit_response_command.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/conflict_resolver.cc
diff --git a/sync/engine/conflict_resolver.cc b/sync/engine/conflict_resolver.cc
index 73c25ead1f768d2ffd7ac1f1bfd27046e6cdb6e7..439a3932069308576787e169fca6bbad5b1cdde1 100644
--- a/sync/engine/conflict_resolver.cc
+++ b/sync/engine/conflict_resolver.cc
@@ -27,7 +27,6 @@ using std::set;
namespace syncer {
-using sessions::ConflictProgress;
using sessions::StatusController;
using syncable::BaseTransaction;
using syncable::Directory;
@@ -291,16 +290,17 @@ ConflictResolver::ProcessSimpleConflict(WriteTransaction* trans,
}
}
-bool ConflictResolver::ResolveConflicts(syncable::WriteTransaction* trans,
- const Cryptographer* cryptographer,
- const ConflictProgress& progress,
- sessions::StatusController* status) {
+bool ConflictResolver::ResolveConflicts(
+ syncable::WriteTransaction* trans,
+ const Cryptographer* cryptographer,
+ const std::set<syncable::Id>& simple_conflict_ids,
+ sessions::StatusController* status) {
bool forward_progress = false;
// Iterate over simple conflict items.
set<Id>::const_iterator conflicting_item_it;
set<Id> processed_items;
- for (conflicting_item_it = progress.SimpleConflictingItemsBegin();
- conflicting_item_it != progress.SimpleConflictingItemsEnd();
+ for (conflicting_item_it = simple_conflict_ids.begin();
+ conflicting_item_it != simple_conflict_ids.end();
++conflicting_item_it) {
Id id = *conflicting_item_it;
if (processed_items.count(id) > 0)
@@ -331,7 +331,7 @@ bool ConflictResolver::ResolveConflicts(syncable::WriteTransaction* trans,
break;
prev_id = new_prev_id;
} while (processed_items.count(prev_id) == 0 &&
- progress.HasSimpleConflictItem(prev_id)); // Excludes root.
+ simple_conflict_ids.count(prev_id) > 0); // Excludes root.
while (!predecessors.empty()) {
id = predecessors.back();
predecessors.pop_back();
« no previous file with comments | « sync/engine/conflict_resolver.h ('k') | sync/engine/process_commit_response_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698