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

Unified Diff: sync/engine/sync_directory_commit_contributor.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/sync_directory_commit_contributor.h
diff --git a/sync/engine/sync_directory_commit_contributor.h b/sync/engine/sync_directory_commit_contributor.h
new file mode 100644
index 0000000000000000000000000000000000000000..527644cdaf2e57d0973ba6b662d71989eea06afe
--- /dev/null
+++ b/sync/engine/sync_directory_commit_contributor.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2013 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.
+
+#ifndef SYNC_ENGINE_SYNC_DIRECTORY_COMMIT_CONTRIBUTOR_H_
+#define SYNC_ENGINE_SYNC_DIRECTORY_COMMIT_CONTRIBUTOR_H_
+
+#include <map>
+
+#include "sync/internal_api/public/base/model_type.h"
+
+namespace syncer {
+
+class SyncDirectoryCommitContribution;
+
+namespace syncable {
+class Directory;
+}
+
+class SyncDirectoryCommitContributor {
Nicolas Zea 2013/10/05 00:06:03 what is the purpose of this class? It just seems l
rlarocque 2013/10/07 23:00:05 Yep, that's exactly what it is. It will be more
+ public:
+ SyncDirectoryCommitContributor(syncable::Directory* dir, ModelType type);
+ ~SyncDirectoryCommitContributor();
+
+ SyncDirectoryCommitContribution* GetContribution(size_t max_entries);
+
+ private:
+ syncable::Directory* dir_;
+ ModelType type_;
+};
+
+// TODO(rlarocque): Find a better place for this definition.
+typedef std::map<ModelType, SyncDirectoryCommitContributor*>
+ CommitContributorMap;
+
+} // namespace
+
+#endif // SYNC_ENGINE_SYNC_DIRECTORY_COMMIT_CONTRIBUTOR_H_

Powered by Google App Engine
This is Rietveld 408576698