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

Unified Diff: sync/engine/resolve_conflicts_command.cc

Issue 11192071: sync: Merge apply updates and resolve conflicts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
Index: sync/engine/resolve_conflicts_command.cc
diff --git a/sync/engine/resolve_conflicts_command.cc b/sync/engine/resolve_conflicts_command.cc
deleted file mode 100644
index 5b7f5e205db602cf904f784694240fcc7bd0e5d3..0000000000000000000000000000000000000000
--- a/sync/engine/resolve_conflicts_command.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "sync/engine/resolve_conflicts_command.h"
-
-#include "sync/engine/conflict_resolver.h"
-#include "sync/sessions/session_state.h"
-#include "sync/sessions/sync_session.h"
-#include "sync/syncable/directory.h"
-#include "sync/syncable/write_transaction.h"
-
-namespace syncer {
-
-ResolveConflictsCommand::ResolveConflictsCommand() {}
-ResolveConflictsCommand::~ResolveConflictsCommand() {}
-
-std::set<ModelSafeGroup> ResolveConflictsCommand::GetGroupsToChange(
- const sessions::SyncSession& session) const {
- return session.GetEnabledGroupsWithConflicts();
-}
-
-SyncerError ResolveConflictsCommand::ModelChangingExecuteImpl(
- sessions::SyncSession* session) {
- ConflictResolver* resolver = session->context()->resolver();
- DCHECK(resolver);
-
- syncable::Directory* dir = session->context()->directory();
- sessions::StatusController* status = session->mutable_status_controller();
- 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,
- *simple_conflict_ids, status));
-
- return SYNCER_OK;
-}
-
-} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698