Chromium Code Reviews| Index: chrome/browser/sync/engine/get_commit_ids_command.h |
| diff --git a/chrome/browser/sync/engine/get_commit_ids_command.h b/chrome/browser/sync/engine/get_commit_ids_command.h |
| index b7286711860832d58bb8713f958ed8a5a59de761..7b4e8ef9660ba801ad18e82efd08071503a40d4c 100644 |
| --- a/chrome/browser/sync/engine/get_commit_ids_command.h |
| +++ b/chrome/browser/sync/engine/get_commit_ids_command.h |
| @@ -129,18 +129,34 @@ class GetCommitIdsCommand : public SyncerCommand { |
| // OrderedCommitSet helpers for adding predecessors in order. |
| // TODO(ncarter): Refactor these so that the |result| parameter goes away, |
| // and AddItem doesn't need to consider two OrderedCommitSets. |
| + |
| + // Adds |item| to |result| if it's ready for committing and was not already |
| + // present. If |item| was added, returns true. If item already existed, |
| + // returns false. If item was not ready for commit, clears |result| and |
|
akalin
2011/12/15 01:58:20
Is there a reason for the 'clear results' action o
|
| + // returns false. |
| bool AddItem(syncable::Entry* item, |
| syncable::ModelTypeSet throttled_types, |
| sessions::OrderedCommitSet* result); |
| + // Adds item and all it's unsynced predecessors to |result| if all that are |
| + // unsynced are ready for commit. If either item or any of it's predecessors |
| + // are unsynced but not ready for commit, clears |result|. |
| + // Return values: |
| + // True: if unsynced items were added to |result| and processing of this set |
| + // should continue. |
| + // False: if processing of the set should not continue, either because not |
| + // all unsynced items were ready for commit or the items are already |
| + // present in |result|. |
| bool AddItemThenPredecessors(syncable::BaseTransaction* trans, |
| syncable::ModelTypeSet throttled_types, |
| syncable::Entry* item, |
| - syncable::IndexedBitField inclusion_filter, |
| sessions::OrderedCommitSet* result); |
| + // Appends all unsynced predecessors of |item|, followed by |item| iteself, |
|
akalin
2011/12/14 03:39:52
iteself -> itself
|
| + // to |ordered_commit_set_|, iff item and all its unsynced predecessors |
| + // are ready for commit. If |item| or any of it's unsynced predecessors |
| + // are unready for commit, does not modify |ordered_commit_set_|. |
|
akalin
2011/12/14 03:39:52
unready -> not ready
|
| void AddPredecessorsThenItem(syncable::BaseTransaction* trans, |
| syncable::ModelTypeSet throttled_types, |
| syncable::Entry* item, |
| - syncable::IndexedBitField inclusion_filter, |
| const ModelSafeRoutingInfo& routes); |
| bool IsCommitBatchFull(); |