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

Unified Diff: chrome/browser/sync/engine/update_applicator.h

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.cc ('k') | chrome/browser/sync/engine/update_applicator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/update_applicator.h
===================================================================
--- chrome/browser/sync/engine/update_applicator.h (revision 30625)
+++ chrome/browser/sync/engine/update_applicator.h (working copy)
@@ -16,22 +16,22 @@
#include "base/basictypes.h"
#include "base/port.h"
+#include "chrome/browser/sync/syncable/syncable.h"
-namespace syncable {
-class Id;
-class WriteTransaction;
-} // namespace syncable
-
namespace browser_sync {
+class ConflictResolver;
class SyncerSession;
class UpdateApplicator {
public:
- typedef std::vector<int64>::iterator vi64iter;
+ typedef syncable::Directory::UnappliedUpdateMetaHandles::iterator
+ UpdateIterator;
- UpdateApplicator(SyncerSession* session, const vi64iter& begin,
- const vi64iter& end);
+ UpdateApplicator(ConflictResolver* resolver,
+ const UpdateIterator& begin,
+ const UpdateIterator& end);
+
// returns true if there's more we can do.
bool AttemptOneApplication(syncable::WriteTransaction* trans);
// return true if we've applied all updates.
@@ -41,13 +41,15 @@
// SyncerSession -- to get that to happen, call this method after update
// application is finished (i.e., when AttemptOneAllocation stops returning
// true).
- void SaveProgressIntoSessionState();
+ void SaveProgressIntoSessionState(SyncerSession* session);
private:
- SyncerSession* const session_;
- vi64iter const begin_;
- vi64iter end_;
- vi64iter pointer_;
+ // Used to resolve conflicts when trying to apply updates.
+ ConflictResolver* const resolver_;
+
+ UpdateIterator const begin_;
+ UpdateIterator end_;
+ UpdateIterator pointer_;
bool progress_;
// Track the result of the various items.
« no previous file with comments | « chrome/browser/sync/engine/syncer_util.cc ('k') | chrome/browser/sync/engine/update_applicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698