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

Unified Diff: sync/engine/non_blocking_type_commit_contribution.h

Issue 294473017: WIP: Towards NonBlockingTypeProcessorCore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « no previous file | sync/engine/non_blocking_type_commit_contribution.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/non_blocking_type_commit_contribution.h
diff --git a/sync/engine/non_blocking_type_commit_contribution.h b/sync/engine/non_blocking_type_commit_contribution.h
new file mode 100644
index 0000000000000000000000000000000000000000..d8af80fbed8f280c993be98034be609c3a06c51c
--- /dev/null
+++ b/sync/engine/non_blocking_type_commit_contribution.h
@@ -0,0 +1,46 @@
+#ifndef SYNC_ENGINE_NON_BLOCKING_TYPE_COMMIT_CONTRIBUTION_H_
+#define SYNC_ENGINE_NON_BLOCKING_TYPE_COMMIT_CONTRIBUTION_H_
+
+#include <vector>
+
+#include "base/basictypes.h"
+#include "sync/engine/commit_contribution.h"
+#include "sync/protocol/sync.pb.h"
+
+namespace syncer {
+
+class NonBlockingTypeProcessorCore;
+
+class NonBlockingTypeCommitContribution : public CommitContribution {
+ public:
+ NonBlockingTypeCommitContribution(
+ NonBlockingTypeProcessorCore* parent,
+ const sync_pb::DataTypeContext& context,
+ const google::protobuf::RepeatedPtrField<sync_pb::SyncEntity>& entities,
+ const std::vector<int64> sequence_numbers);
+ virtual ~NonBlockingTypeCommitContribution();
+
+ virtual void AddToCommitMessage(sync_pb::ClientToServerMessage* msg) OVERRIDE;
+ virtual SyncerError ProcessCommitResponse(
+ const sync_pb::ClientToServerResponse& response,
+ sessions::StatusController* status) OVERRIDE;
+ virtual void CleanUp() OVERRIDE;
+ virtual size_t GetNumEntries() const OVERRIDE;
+
+ private:
+ NonBlockingTypeProcessorCore* parent_;
+
+ sync_pb::DataTypeContext context_;
+ const google::protobuf::RepeatedPtrField<sync_pb::SyncEntity> entities_;
+ const std::vector<int64> sequence_numbers_;
+
+ size_t entries_start_index_;
+
+ bool cleaned_up_;
+
+ DISALLOW_COPY_AND_ASSIGN(NonBlockingTypeCommitContribution);
+};
+
+} // namespace syncer
+
+#endif // SYNC_ENGINE_NON_BLOCKING_TYPE_COMMIT_CONTRIBUTION_H_
« no previous file with comments | « no previous file | sync/engine/non_blocking_type_commit_contribution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698