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

Unified Diff: sync/engine/build_commit_command.h

Issue 10210009: sync: Loop committing items without downloading updates (v2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 7 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
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.cc ('k') | sync/engine/build_commit_command.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/build_commit_command.h
diff --git a/sync/engine/build_commit_command.h b/sync/engine/build_commit_command.h
index d18c94b8f1a84da8a30dabcfe2e5efa025592a8c..91eb32034b492c42b71efe626009d46bc290c484 100644
--- a/sync/engine/build_commit_command.h
+++ b/sync/engine/build_commit_command.h
@@ -14,9 +14,26 @@
namespace browser_sync {
+namespace sessions {
+class OrderedCommitSet;
+}
+
+// A class that contains the code used to serialize a set of sync items into a
+// protobuf commit message. This conversion process references the
+// syncable::Directory, which is why it must be called within the same
+// transaction as the GetCommitIdsCommand that fetched the set of items to be
+// committed.
+//
+// See SyncerCommand documentation for more info.
class BuildCommitCommand : public SyncerCommand {
public:
- BuildCommitCommand();
+ // The batch_commit_set parameter contains a set of references to the items
+ // that should be committed.
+ //
+ // The commit_message parameter is an output parameter which will contain the
+ // fully initialized commit message once ExecuteImpl() has been called.
+ BuildCommitCommand(const sessions::OrderedCommitSet& batch_commit_set,
+ ClientToServerMessage* commit_message);
virtual ~BuildCommitCommand();
// SyncerCommand implementation.
@@ -44,6 +61,12 @@ class BuildCommitCommand : public SyncerCommand {
int64 InterpolatePosition(int64 lo, int64 hi);
DISALLOW_COPY_AND_ASSIGN(BuildCommitCommand);
+
+ // Input parameter; see constructor comment.
+ const sessions::OrderedCommitSet& batch_commit_set_;
+
+ // Output parameter; see constructor comment.
+ ClientToServerMessage* commit_message_;
};
} // namespace browser_sync
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.cc ('k') | sync/engine/build_commit_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698