| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GET_COMMIT_IDS_COMMAND_H_ | 5 #ifndef SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ |
| 6 #define SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ | 6 #define SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // are ready to commit. | 51 // are ready to commit. |
| 52 // An entry is not considered ready for commit if any are true: | 52 // An entry is not considered ready for commit if any are true: |
| 53 // 1. It's in conflict. | 53 // 1. It's in conflict. |
| 54 // 2. It requires encryption (either the type is encrypted but a passphrase | 54 // 2. It requires encryption (either the type is encrypted but a passphrase |
| 55 // is missing from the cryptographer, or the entry itself wasn't properly | 55 // is missing from the cryptographer, or the entry itself wasn't properly |
| 56 // encrypted). | 56 // encrypted). |
| 57 // 3. It's type is currently throttled. | 57 // 3. It's type is currently throttled. |
| 58 // 4. It's a delete but has not been committed. | 58 // 4. It's a delete but has not been committed. |
| 59 void FilterUnreadyEntries( | 59 void FilterUnreadyEntries( |
| 60 syncable::BaseTransaction* trans, | 60 syncable::BaseTransaction* trans, |
| 61 syncer::ModelTypeSet throttled_types, | 61 ModelTypeSet throttled_types, |
| 62 syncer::ModelTypeSet encrypted_types, | 62 ModelTypeSet encrypted_types, |
| 63 bool passphrase_missing, | 63 bool passphrase_missing, |
| 64 const syncable::Directory::UnsyncedMetaHandles& unsynced_handles, | 64 const syncable::Directory::UnsyncedMetaHandles& unsynced_handles, |
| 65 std::set<int64>* ready_unsynced_set); | 65 std::set<int64>* ready_unsynced_set); |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 // Add all the uncommitted parents (and their predecessors) of |item| to | 68 // Add all the uncommitted parents (and their predecessors) of |item| to |
| 69 // |result| if they are ready to commit. Entries are added in root->child | 69 // |result| if they are ready to commit. Entries are added in root->child |
| 70 // order and predecessor->successor order. | 70 // order and predecessor->successor order. |
| 71 // Returns values: | 71 // Returns values: |
| 72 // False: if a dependent item was in conflict, and hence no child cannot be | 72 // False: if a dependent item was in conflict, and hence no child cannot be |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 // Output parameter; see constructor comment. | 131 // Output parameter; see constructor comment. |
| 132 sessions::OrderedCommitSet* commit_set_; | 132 sessions::OrderedCommitSet* commit_set_; |
| 133 | 133 |
| 134 DISALLOW_COPY_AND_ASSIGN(GetCommitIdsCommand); | 134 DISALLOW_COPY_AND_ASSIGN(GetCommitIdsCommand); |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 } // namespace syncer | 137 } // namespace syncer |
| 138 | 138 |
| 139 #endif // SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ | 139 #endif // SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ |
| OLD | NEW |