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

Side by Side 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: Attempt to fix win compile Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SYNC_ENGINE_SYNC_DIRECTORY_COMMIT_CONTRIBUTOR_H_
6 #define SYNC_ENGINE_SYNC_DIRECTORY_COMMIT_CONTRIBUTOR_H_
7
8 #include <map>
9
10 #include "sync/internal_api/public/base/model_type.h"
11
12 namespace syncer {
13
14 class SyncDirectoryCommitContribution;
15
16 namespace syncable {
17 class Directory;
18 }
19
20 // This class represents the syncable::Directory as a source of items to commit
21 // to the sync server.
22 //
23 // Each instance of this class represents a particular type within the
24 // syncable::Directory. When asked, it will iterate through the directory, grab
25 // any items of its type that are ready for commit, and return them in the form
26 // of a SyncDirectoryCommitContribution.
27 class SyncDirectoryCommitContributor {
28 public:
29 SyncDirectoryCommitContributor(syncable::Directory* dir, ModelType type);
30 ~SyncDirectoryCommitContributor();
31
32 SyncDirectoryCommitContribution* GetContribution(size_t max_entries);
33
34 private:
35 syncable::Directory* dir_;
36 ModelType type_;
37 };
38
39 // TODO(rlarocque): Find a better place for this definition.
40 typedef std::map<ModelType, SyncDirectoryCommitContributor*>
41 CommitContributorMap;
42
43 } // namespace
44
45 #endif // SYNC_ENGINE_SYNC_DIRECTORY_COMMIT_CONTRIBUTOR_H_
OLDNEW
« no previous file with comments | « sync/engine/sync_directory_commit_contribution_unittest.cc ('k') | sync/engine/sync_directory_commit_contributor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698