| 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 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_PROCESSOR_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_PROCESSOR_H_ |
| 6 #define COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_PROCESSOR_H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_PROCESSOR_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "components/sync/base/model_type.h" | 14 #include "components/sync/base/model_type.h" |
| 15 #include "components/sync/engine/model_safe_worker.h" | 15 #include "components/sync/engine/model_safe_worker.h" |
| 16 #include "components/sync/engine_impl/commit.h" | 16 #include "components/sync/engine_impl/commit.h" |
| 17 #include "components/sync/engine_impl/model_type_registry.h" | 17 #include "components/sync/engine_impl/model_type_registry.h" |
| 18 | 18 |
| 19 namespace syncer { | 19 namespace syncer { |
| 20 | 20 |
| 21 namespace syncable { | |
| 22 class Directory; | |
| 23 } // namespace syncable | |
| 24 | |
| 25 class CommitContributor; | 21 class CommitContributor; |
| 26 class CommitContribution; | |
| 27 | 22 |
| 28 // This class manages the set of per-type committer objects. | 23 // This class manages the set of per-type committer objects. |
| 29 // | 24 // |
| 30 // It owns these types and hides the details of iterating over all of them. | 25 // It owns these types and hides the details of iterating over all of them. |
| 31 // Many methods allow the caller to specify a subset of types on which the | 26 // Many methods allow the caller to specify a subset of types on which the |
| 32 // operation is to be applied. It is a logic error if the supplied set of types | 27 // operation is to be applied. It is a logic error if the supplied set of types |
| 33 // contains a type which was not previously registered. | 28 // contains a type which was not previously registered. |
| 34 class CommitProcessor { | 29 class CommitProcessor { |
| 35 public: | 30 public: |
| 36 // Contructs a CommitProcessor from a map of CommitContributors. | 31 // Contructs a CommitProcessor from a map of CommitContributors. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 55 private: | 50 private: |
| 56 // A map of 'commit contributors', one for each enabled type. | 51 // A map of 'commit contributors', one for each enabled type. |
| 57 CommitContributorMap* commit_contributor_map_; | 52 CommitContributorMap* commit_contributor_map_; |
| 58 | 53 |
| 59 DISALLOW_COPY_AND_ASSIGN(CommitProcessor); | 54 DISALLOW_COPY_AND_ASSIGN(CommitProcessor); |
| 60 }; | 55 }; |
| 61 | 56 |
| 62 } // namespace syncer | 57 } // namespace syncer |
| 63 | 58 |
| 64 #endif // COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_PROCESSOR_H_ | 59 #endif // COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_PROCESSOR_H_ |
| OLD | NEW |