summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/engine/syncer_util.cc
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-03 21:39:08 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-03 21:39:08 +0000
commitf2844d1b15c4ff971a0846ad2440225b14649e56 (patch)
tree6936754ebddaa2fd3423c7e0a9f97b7df1999c62 /chrome/browser/sync/engine/syncer_util.cc
parent54821359244e0609d7c86faadf5a1b6d0f5b5388 (diff)
downloadchromium_src-f2844d1b15c4ff971a0846ad2440225b14649e56.zip
chromium_src-f2844d1b15c4ff971a0846ad2440225b14649e56.tar.gz
chromium_src-f2844d1b15c4ff971a0846ad2440225b14649e56.tar.bz2
Remove context-based dependencies on SyncerSession from ApplyUpdatesCommand.
This helps clarify UpdateApplicator and removes SyncerSession from SyncerUtil. Part of work to separate sync session "context" like the ConflictResolver, ServerConnectionManager, ModelSafeWorker, etc from progress state. BUG=25266 TEST=sync unit tests Review URL: http://codereview.chromium.org/351026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30868 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/engine/syncer_util.cc')
-rw-r--r--chrome/browser/sync/engine/syncer_util.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/chrome/browser/sync/engine/syncer_util.cc b/chrome/browser/sync/engine/syncer_util.cc
index 8e32838..4074cd6 100644
--- a/chrome/browser/sync/engine/syncer_util.cc
+++ b/chrome/browser/sync/engine/syncer_util.cc
@@ -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 @@ void SyncerUtil::AttemptReuniteLostCommitResponses(
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::AttemptToUpdateEntry(
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))