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

Unified Diff: sync/engine/directory_commit_contributor.h

Issue 161253002: sync: Add interfaces for per-type sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another win compile fix Created 6 years, 10 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 | « sync/engine/directory_commit_contribution_unittest.cc ('k') | sync/engine/directory_commit_contributor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/directory_commit_contributor.h
diff --git a/sync/engine/sync_directory_commit_contributor.h b/sync/engine/directory_commit_contributor.h
similarity index 52%
rename from sync/engine/sync_directory_commit_contributor.h
rename to sync/engine/directory_commit_contributor.h
index 4a900754c00eeeed2f8a07f71670ee711c66f281..d4aa50373959c3d844fde1a17e483ba27a1680b9 100644
--- a/sync/engine/sync_directory_commit_contributor.h
+++ b/sync/engine/directory_commit_contributor.h
@@ -2,17 +2,18 @@
// 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_
+#ifndef SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTOR_H_
+#define SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTOR_H_
#include <map>
+#include "base/memory/scoped_ptr.h"
+#include "sync/engine/commit_contributor.h"
+#include "sync/engine/directory_commit_contribution.h"
#include "sync/internal_api/public/base/model_type.h"
namespace syncer {
-class SyncDirectoryCommitContribution;
-
namespace syncable {
class Directory;
}
@@ -23,19 +24,22 @@ class Directory;
// Each instance of this class represents a particular type within the
// syncable::Directory. When asked, it will iterate through the directory, grab
// any items of its type that are ready for commit, and return them in the form
-// of a SyncDirectoryCommitContribution.
-class SyncDirectoryCommitContributor {
+// of a DirectoryCommitContribution.
+class DirectoryCommitContributor : public CommitContributor {
public:
- SyncDirectoryCommitContributor(syncable::Directory* dir, ModelType type);
- ~SyncDirectoryCommitContributor();
+ DirectoryCommitContributor(syncable::Directory* dir, ModelType type);
+ virtual ~DirectoryCommitContributor();
- SyncDirectoryCommitContribution* GetContribution(size_t max_entries);
+ virtual scoped_ptr<CommitContribution> GetContribution(
+ size_t max_entries) OVERRIDE;
private:
syncable::Directory* dir_;
ModelType type_;
+
+ DISALLOW_COPY_AND_ASSIGN(DirectoryCommitContributor);
};
} // namespace
-#endif // SYNC_ENGINE_SYNC_DIRECTORY_COMMIT_CONTRIBUTOR_H_
+#endif // SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTOR_H_
« no previous file with comments | « sync/engine/directory_commit_contribution_unittest.cc ('k') | sync/engine/directory_commit_contributor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698