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

Side by Side Diff: components/sync/engine_impl/commit_contributor.h

Issue 2511973004: components: Cleanup class/struct fwd declarations (Closed)
Patch Set: Rebase on top of current master branch Created 4 years 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
« no previous file with comments | « components/sync/engine_impl/commit.h ('k') | components/sync/engine_impl/commit_processor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_CONTRIBUTOR_H_ 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_CONTRIBUTOR_H_
6 #define COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_CONTRIBUTOR_H_ 6 #define COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_CONTRIBUTOR_H_
7 7
8 #include <cstddef> 8 #include <cstddef>
9 #include <memory> 9 #include <memory>
10 10
11 11
12 namespace syncer { 12 namespace syncer {
13 13
14 class CommitContribution; 14 class CommitContribution;
15 15
16 namespace syncable {
17 class Directory;
18 }
19
20 // This class represents a source of items to commit to the sync server. 16 // This class represents a source of items to commit to the sync server.
21 // 17 //
22 // When asked, it can return CommitContribution objects that contain a set of 18 // When asked, it can return CommitContribution objects that contain a set of
23 // items to be committed from this source. 19 // items to be committed from this source.
24 class CommitContributor { 20 class CommitContributor {
25 public: 21 public:
26 CommitContributor(); 22 CommitContributor();
27 virtual ~CommitContributor() = 0; 23 virtual ~CommitContributor() = 0;
28 24
29 // Gathers up to |max_entries| unsynced items from this contributor into a 25 // Gathers up to |max_entries| unsynced items from this contributor into a
30 // CommitContribution. Returns null when the contributor has nothing to 26 // CommitContribution. Returns null when the contributor has nothing to
31 // contribute. 27 // contribute.
32 virtual std::unique_ptr<CommitContribution> GetContribution( 28 virtual std::unique_ptr<CommitContribution> GetContribution(
33 size_t max_entries) = 0; 29 size_t max_entries) = 0;
34 }; 30 };
35 31
36 } // namespace syncer 32 } // namespace syncer
37 33
38 #endif // COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_CONTRIBUTOR_H_ 34 #endif // COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_CONTRIBUTOR_H_
OLDNEW
« no previous file with comments | « components/sync/engine_impl/commit.h ('k') | components/sync/engine_impl/commit_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698