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 SYNC_ENGINE_COMMIT_PROCESSOR_H_ | 5 #ifndef SYNC_ENGINE_COMMIT_PROCESSOR_H_ |
6 #define SYNC_ENGINE_COMMIT_PROCESSOR_H_ | 6 #define SYNC_ENGINE_COMMIT_PROCESSOR_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 27 matching lines...) Expand all Loading... |
38 // The CommitProcessor does not own this map. | 38 // The CommitProcessor does not own this map. |
39 explicit CommitProcessor(CommitContributorMap* commit_contributor_map); | 39 explicit CommitProcessor(CommitContributorMap* commit_contributor_map); |
40 ~CommitProcessor(); | 40 ~CommitProcessor(); |
41 | 41 |
42 // Gathers a set of contributions to be used to populate a commit message. | 42 // Gathers a set of contributions to be used to populate a commit message. |
43 // | 43 // |
44 // For each of the |commit_types| in this CommitProcessor's CommitContributor | 44 // For each of the |commit_types| in this CommitProcessor's CommitContributor |
45 // map, gather any entries queued for commit into CommitContributions. The | 45 // map, gather any entries queued for commit into CommitContributions. The |
46 // total number of entries in all the returned CommitContributions shall not | 46 // total number of entries in all the returned CommitContributions shall not |
47 // exceed |max_entries|. | 47 // exceed |max_entries|. |
| 48 // Note: |cookie_jar_mismatch| and |cookie_jar_empty| are used only for |
| 49 // metrics recording purposes specific to the SESSIONS type. |
48 void GatherCommitContributions(ModelTypeSet commit_types, | 50 void GatherCommitContributions(ModelTypeSet commit_types, |
49 size_t max_entries, | 51 size_t max_entries, |
| 52 bool cookie_jar_mismatch, |
| 53 bool cookie_jar_empty, |
50 Commit::ContributionMap* contributions); | 54 Commit::ContributionMap* contributions); |
51 | 55 |
52 private: | 56 private: |
53 // A map of 'commit contributors', one for each enabled type. | 57 // A map of 'commit contributors', one for each enabled type. |
54 CommitContributorMap* commit_contributor_map_; | 58 CommitContributorMap* commit_contributor_map_; |
55 | 59 |
56 DISALLOW_COPY_AND_ASSIGN(CommitProcessor); | 60 DISALLOW_COPY_AND_ASSIGN(CommitProcessor); |
57 }; | 61 }; |
58 | 62 |
59 } // namespace syncer | 63 } // namespace syncer |
60 | 64 |
61 #endif // SYNC_ENGINE_COMMIT_PROCESSOR_H_ | 65 #endif // SYNC_ENGINE_COMMIT_PROCESSOR_H_ |
OLD | NEW |