Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1031)

Side by Side Diff: sync/engine/get_commit_ids.h

Issue 23809005: sync: Implement per-type GetCommitIds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unnecessary whitespace Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 // Returns up to |max_entries| metahandles of entries that belong to the
27 // specified |type| and are ready for commit. The returned handles will be
28 // in a valid commit ordering.
tim (not reviewing) 2013/09/08 19:48:20 nit - Do we explain what 'valid commit ordering' i
29 SYNC_EXPORT_PRIVATE void GetCommitIdsForType(
30 syncable::BaseTransaction* trans,
31 ModelType type,
32 size_t max_entries,
33 std::vector<int64>* out);
34
35 // Fills the specified |ordered_commit_set| with up to |commit_batch_size|
36 // metahandles that belong to the set of types |requested_types| and are ready
37 // for commit. The list will be in a valid commit ordering.
38 SYNC_EXPORT_PRIVATE void GetCommitIds(
39 syncable::BaseTransaction* trans,
40 ModelTypeSet requested_types,
41 size_t commit_batch_size,
42 sessions::OrderedCommitSet* ordered_commit_set);
43
44 } // namespace syncer
45
46 #endif // SYNC_ENGINE_GET_COMMIT_IDS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698