OLD | NEW |
| (Empty) |
1 // Copyright 2013 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 <stddef.h> | |
9 #include <stdint.h> | |
10 | |
11 #include <vector> | |
12 | |
13 #include "sync/base/sync_export.h" | |
14 #include "sync/internal_api/public/base/model_type.h" | |
15 #include "sync/syncable/directory.h" | |
16 | |
17 using std::vector; | |
18 | |
19 namespace syncer { | |
20 | |
21 namespace syncable { | |
22 class BaseTransaction; | |
23 } | |
24 | |
25 // Returns up to |max_entries| metahandles of entries that belong to the | |
26 // specified |type| and are ready for commit. | |
27 // | |
28 // This function returns handles in "commit order". A valid commit ordering is | |
29 // one where server-unknown items are committed parents-first, and deletions | |
30 // are committed children-first. | |
31 // | |
32 // This function also enforces some position ordering constraints that are no | |
33 // longer necessary. We should relax those constraints. See crbug.com/287938. | |
34 SYNC_EXPORT void GetCommitIdsForType(syncable::BaseTransaction* trans, | |
35 ModelType type, | |
36 size_t max_entries, | |
37 std::vector<int64_t>* out); | |
38 | |
39 } // namespace syncer | |
40 | |
41 #endif // SYNC_ENGINE_GET_COMMIT_IDS_H_ | |
OLD | NEW |