OLD | NEW |
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 #include "components/sync/engine_impl/directory_commit_contributor.h" | 5 #include "components/sync/engine_impl/directory_commit_contributor.h" |
6 | 6 |
7 #include <stddef.h> | |
8 | |
9 #include "components/sync/engine_impl/cycle/directory_type_debug_info_emitter.h" | 7 #include "components/sync/engine_impl/cycle/directory_type_debug_info_emitter.h" |
10 #include "components/sync/engine_impl/directory_commit_contribution.h" | |
11 | 8 |
12 namespace syncer { | 9 namespace syncer { |
13 | 10 |
14 DirectoryCommitContributor::DirectoryCommitContributor( | 11 DirectoryCommitContributor::DirectoryCommitContributor( |
15 syncable::Directory* dir, | 12 syncable::Directory* dir, |
16 ModelType type, | 13 ModelType type, |
17 DirectoryTypeDebugInfoEmitter* debug_info_emitter) | 14 DirectoryTypeDebugInfoEmitter* debug_info_emitter) |
18 : dir_(dir), type_(type), debug_info_emitter_(debug_info_emitter) {} | 15 : dir_(dir), type_(type), debug_info_emitter_(debug_info_emitter) {} |
19 | 16 |
20 DirectoryCommitContributor::~DirectoryCommitContributor() {} | 17 DirectoryCommitContributor::~DirectoryCommitContributor() {} |
21 | 18 |
22 std::unique_ptr<CommitContribution> DirectoryCommitContributor::GetContribution( | 19 std::unique_ptr<CommitContribution> DirectoryCommitContributor::GetContribution( |
23 size_t max_entries) { | 20 size_t max_entries) { |
24 return DirectoryCommitContribution::Build(dir_, type_, max_entries, | 21 return DirectoryCommitContribution::Build(dir_, type_, max_entries, |
25 debug_info_emitter_); | 22 debug_info_emitter_); |
26 } | 23 } |
27 | 24 |
28 } // namespace syncer | 25 } // namespace syncer |
OLD | NEW |