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

Unified Diff: chrome/browser/sync/engine/conflict_resolver.cc

Issue 8638001: [Sync] Made some sync session member functions const (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix latent bug in StatusController Created 9 years, 1 month 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
Index: chrome/browser/sync/engine/conflict_resolver.cc
diff --git a/chrome/browser/sync/engine/conflict_resolver.cc b/chrome/browser/sync/engine/conflict_resolver.cc
index d8b6848105c210799dbf11a2f04110eaa29c4430..10f67df577c32fab32e6cf80037bba317fad4800 100644
--- a/chrome/browser/sync/engine/conflict_resolver.cc
+++ b/chrome/browser/sync/engine/conflict_resolver.cc
@@ -455,14 +455,15 @@ bool ConflictResolver::LogAndSignalIfConflictStuck(
// that's obviously not working.
}
-bool ConflictResolver::ResolveSimpleConflicts(const ScopedDirLookup& dir,
- StatusController* status) {
+bool ConflictResolver::ResolveSimpleConflicts(
+ const ScopedDirLookup& dir,
+ const ConflictProgress& progress,
+ sessions::StatusController* status) {
WriteTransaction trans(FROM_HERE, syncable::SYNCER, dir);
bool forward_progress = false;
- const ConflictProgress& progress = status->conflict_progress();
// First iterate over simple conflict items (those that belong to no set).
set<Id>::const_iterator conflicting_item_it;
- for (conflicting_item_it = progress.ConflictingItemsBeginConst();
+ for (conflicting_item_it = progress.ConflictingItemsBegin();
conflicting_item_it != progress.ConflictingItemsEnd();
++conflicting_item_it) {
Id id = *conflicting_item_it;
@@ -497,10 +498,10 @@ bool ConflictResolver::ResolveSimpleConflicts(const ScopedDirLookup& dir,
}
bool ConflictResolver::ResolveConflicts(const ScopedDirLookup& dir,
- StatusController* status) {
- const ConflictProgress& progress = status->conflict_progress();
+ const ConflictProgress& progress,
+ sessions::StatusController* status) {
bool rv = false;
- if (ResolveSimpleConflicts(dir, status))
+ if (ResolveSimpleConflicts(dir, progress, status))
rv = true;
WriteTransaction trans(FROM_HERE, syncable::SYNCER, dir);
set<ConflictSet*>::const_iterator set_it;
« no previous file with comments | « chrome/browser/sync/engine/conflict_resolver.h ('k') | chrome/browser/sync/engine/download_updates_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698