| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // present. | 74 // present. |
| 75 // Prereq: |item| is unsynced. | 75 // Prereq: |item| is unsynced. |
| 76 // Returns values: | 76 // Returns values: |
| 77 // False: if |item| was in conflict. | 77 // False: if |item| was in conflict. |
| 78 // True: if |item| was checked for commit readiness and added to |result| | 78 // True: if |item| was checked for commit readiness and added to |result| |
| 79 // as necessary. | 79 // as necessary. |
| 80 bool AddItem(const std::set<int64>& ready_unsynced_set, | 80 bool AddItem(const std::set<int64>& ready_unsynced_set, |
| 81 const syncable::Entry& item, | 81 const syncable::Entry& item, |
| 82 sessions::OrderedCommitSet* result) const; | 82 sessions::OrderedCommitSet* result) const; |
| 83 | 83 |
| 84 // Adds item and all it's unsynced predecessors to |result| as necessary, as | 84 // Adds item and all its unsynced predecessors to |result| as necessary, as |
| 85 // long as no item was in conflict. | 85 // long as no item was in conflict. |
| 86 // Return values: | 86 // Return values: |
| 87 // False: if there was an entry in conflict. | 87 // False: if there was an entry in conflict. |
| 88 // True: if all entries were checked for commit readiness and added to | 88 // True: if all entries were checked for commit readiness and added to |
| 89 // |result| as necessary. | 89 // |result| as necessary. |
| 90 bool AddItemThenPredecessors(syncable::BaseTransaction* trans, | 90 bool AddItemThenPredecessors(syncable::BaseTransaction* trans, |
| 91 const std::set<int64>& ready_unsynced_set, | 91 const std::set<int64>& ready_unsynced_set, |
| 92 const syncable::Entry& item, | 92 const syncable::Entry& item, |
| 93 sessions::OrderedCommitSet* result) const; | 93 sessions::OrderedCommitSet* result) const; |
| 94 | 94 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 117 scoped_ptr<sessions::OrderedCommitSet> ordered_commit_set_; | 117 scoped_ptr<sessions::OrderedCommitSet> ordered_commit_set_; |
| 118 | 118 |
| 119 int requested_commit_batch_size_; | 119 int requested_commit_batch_size_; |
| 120 | 120 |
| 121 DISALLOW_COPY_AND_ASSIGN(GetCommitIdsCommand); | 121 DISALLOW_COPY_AND_ASSIGN(GetCommitIdsCommand); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace browser_sync | 124 } // namespace browser_sync |
| 125 | 125 |
| 126 #endif // SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ | 126 #endif // SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ |
| OLD | NEW |