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

Unified Diff: sync/engine/build_commit_command.h

Issue 25638003: sync: Implement per-type commit interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile warning Created 7 years, 3 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/build_commit_command.h
diff --git a/sync/engine/build_commit_command.h b/sync/engine/build_commit_command.h
index a47c62afe0c97bbb7e7da1095563be010998697c..bab819fae30bcdb9d81ac94a75b1b32fa79bbacb 100644
--- a/sync/engine/build_commit_command.h
+++ b/sync/engine/build_commit_command.h
@@ -10,15 +10,12 @@
#include "base/gtest_prod_util.h"
#include "sync/base/sync_export.h"
#include "sync/engine/syncer_command.h"
+#include "sync/internal_api/public/engine/model_safe_worker.h"
#include "sync/syncable/entry_kernel.h"
#include "sync/util/extensions_activity.h"
namespace syncer {
-namespace sessions {
-class OrderedCommitSet;
-}
-
namespace syncable {
class Entry;
class BaseTransaction;
@@ -33,48 +30,24 @@ class BaseTransaction;
// See SyncerCommand documentation for more info.
class SYNC_EXPORT_PRIVATE BuildCommitCommand : public SyncerCommand {
public:
- // 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(
- syncable::BaseTransaction* trans,
- const sessions::OrderedCommitSet& batch_commit_set,
- sync_pb::ClientToServerMessage* commit_message,
- ExtensionsActivity::Records* extensions_activity_buffer);
- virtual ~BuildCommitCommand();
-
- // SyncerCommand implementation.
- virtual SyncerError ExecuteImpl(sessions::SyncSession* session) OVERRIDE;
-
// Helper function that takes a snapshot of |meta_entry| and puts it into a
// protobuf suitable for use in a commit request message.
static void BuildCommitItem(const syncable::Entry& meta_entry,
sync_pb::SyncEntity* sync_entry);
- private:
- FRIEND_TEST_ALL_PREFIXES(BuildCommitCommandTest, InterpolatePosition);
-
- void AddExtensionsActivityToMessage(sessions::SyncSession* session,
- sync_pb::CommitMessage* message);
+ // Adds bookmark extensions activity report to |message|.
+ static void AddExtensionsActivityToMessage(
+ ExtensionsActivity* activity,
+ ExtensionsActivity::Records* extensions_activity_buffer,
+ sync_pb::CommitMessage* message);
// Fills the config_params field of |message|.
- void AddClientConfigParamsToMessage(sessions::SyncSession* session,
- sync_pb::CommitMessage* message);
+ static void AddClientConfigParamsToMessage(
+ ModelTypeSet enabled_types,
+ sync_pb::CommitMessage* message);
- DISALLOW_COPY_AND_ASSIGN(BuildCommitCommand);
-
- // A pointer to a valid transaction not owned by this class.
- syncable::BaseTransaction* trans_;
-
- // Input parameter; see constructor comment.
- const sessions::OrderedCommitSet& batch_commit_set_;
-
- // Output parameter; see constructor comment.
- sync_pb::ClientToServerMessage* commit_message_;
-
- ExtensionsActivity::Records* extensions_activity_buffer_;
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(BuildCommitCommand);
};
} // namespace syncer
« no previous file with comments | « no previous file | sync/engine/build_commit_command.cc » ('j') | sync/engine/sync_directory_commit_contribution.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698