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

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

Issue 351026: Remove context-based dependencies on SyncerSession from ApplyUpdatesCommand.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/sync/engine/syncer_util.h ('k') | chrome/browser/sync/engine/update_applicator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/syncer_util.cc
===================================================================
--- chrome/browser/sync/engine/syncer_util.cc (revision 30625)
+++ chrome/browser/sync/engine/syncer_util.cc (working copy)
@@ -10,7 +10,6 @@
#include "chrome/browser/sync/engine/conflict_resolver.h"
#include "chrome/browser/sync/engine/syncer_proto_util.h"
-#include "chrome/browser/sync/engine/syncer_session.h"
#include "chrome/browser/sync/engine/syncer_types.h"
#include "chrome/browser/sync/engine/syncproto.h"
#include "chrome/browser/sync/syncable/directory_manager.h"
@@ -220,20 +219,17 @@
UpdateAttemptResponse SyncerUtil::AttemptToUpdateEntry(
syncable::WriteTransaction* const trans,
syncable::MutableEntry* const entry,
- SyncerSession* const session) {
+ ConflictResolver* resolver) {
syncable::Id conflicting_id;
UpdateAttemptResponse result =
- AttemptToUpdateEntryWithoutMerge(trans, entry, session,
- &conflicting_id);
+ AttemptToUpdateEntryWithoutMerge(trans, entry, &conflicting_id);
if (result != NAME_CONFLICT) {
return result;
}
syncable::MutableEntry same_path(trans, syncable::GET_BY_ID, conflicting_id);
CHECK(same_path.good());
- ConflictResolver* resolver = session->resolver();
-
if (resolver &&
resolver->AttemptItemMerge(trans, &same_path, entry)) {
return SUCCESS;
@@ -247,7 +243,7 @@
UpdateAttemptResponse SyncerUtil::AttemptToUpdateEntryWithoutMerge(
syncable::WriteTransaction* const trans,
syncable::MutableEntry* const entry,
- SyncerSession* const session, syncable::Id* const conflicting_id) {
+ syncable::Id* const conflicting_id) {
CHECK(entry->good());
if (!entry->Get(IS_UNAPPLIED_UPDATE))
« no previous file with comments | « chrome/browser/sync/engine/syncer_util.h ('k') | chrome/browser/sync/engine/update_applicator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698