OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef SYNC_ENGINE_GET_COMMIT_IDS_H_ | |
6 #define SYNC_ENGINE_GET_COMMIT_IDS_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "sync/base/sync_export.h" | |
11 #include "sync/internal_api/public/base/model_type.h" | |
12 #include "sync/syncable/directory.h" | |
13 | |
14 using std::vector; | |
15 | |
16 namespace syncer { | |
17 | |
18 namespace sessions { | |
19 class OrderedCommitSet; | |
20 } | |
21 | |
22 namespace syncable { | |
23 class BaseTransaction; | |
24 } | |
25 | |
26 // These functions return handles in "commit order". A valid commit ordering is | |
27 // one where parents are placed before children, predecessors are placed before | |
28 // successors, and deletes appear after creates and moves. | |
29 // | |
30 // The predecessor to successor rule was implemented when we tracked positions | |
31 // within a folder that was sensitive to such things. The current positioning | |
32 // system can handle receiving the elements within a folder out of order, so we | |
33 // may be able to remove that functionality in the future. | |
34 // See crbug.com/287938. | |
35 | |
36 // Returns up to |max_entries| metahandles of entries that belong to the | |
37 // specified |type| and are ready for commit. The returned handles will be | |
38 // in a valid commit ordering. | |
39 SYNC_EXPORT_PRIVATE void GetCommitIdsForType( | |
Nicolas Zea
2013/09/09 17:58:15
nit: this function isn't actually returning anythi
| |
40 syncable::BaseTransaction* trans, | |
41 ModelType type, | |
42 size_t max_entries, | |
43 std::vector<int64>* out); | |
44 | |
45 // Fills the specified |ordered_commit_set| with up to |commit_batch_size| | |
46 // metahandles that belong to the set of types |requested_types| and are ready | |
47 // for commit. The list will be in a valid commit ordering. | |
48 SYNC_EXPORT_PRIVATE void GetCommitIds( | |
49 syncable::BaseTransaction* trans, | |
50 ModelTypeSet requested_types, | |
51 size_t commit_batch_size, | |
52 sessions::OrderedCommitSet* ordered_commit_set); | |
53 | |
54 } // namespace syncer | |
55 | |
56 #endif // SYNC_ENGINE_GET_COMMIT_IDS_H_ | |
OLD | NEW |