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.
5 #ifndef SYNC_ENGINE_GET_COMMIT_IDS_H_
6 #define SYNC_ENGINE_GET_COMMIT_IDS_H_
10 #include "sync/base/sync_export.h"
11 #include "sync/internal_api/public/base/model_type.h"
12 #include "sync/syncable/directory.h"
19 class BaseTransaction
;
22 // Returns up to |max_entries| metahandles of entries that belong to the
23 // specified |type| and are ready for commit.
25 // This function returns handles in "commit order". A valid commit ordering is
26 // one where parents are placed before children, predecessors are placed before
27 // successors, and deletes appear after creates and moves.
29 // The predecessor to successor rule was implemented when we tracked positions
30 // within a folder that was sensitive to such things. The current positioning
31 // system can handle receiving the elements within a folder out of order, so we
32 // may be able to remove that functionality in the future.
33 // See crbug.com/287938.
34 SYNC_EXPORT_PRIVATE
void GetCommitIdsForType(
35 syncable::BaseTransaction
* trans
,
38 std::vector
<int64
>* out
);
42 #endif // SYNC_ENGINE_GET_COMMIT_IDS_H_