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_PROCESS_UPDATES_UTIL_H_
6 #define SYNC_ENGINE_PROCESS_UPDATES_UTIL_H_
10 #include "sync/internal_api/public/base/model_type.h"
19 class StatusController
;
23 class ModelNeutralWriteTransaction
;
27 struct UpdateCounters
;
29 typedef std::vector
<const sync_pb::SyncEntity
*> SyncEntityList
;
31 // Processes all the updates associated with a single ModelType.
32 void ProcessDownloadedUpdates(
33 syncable::Directory
* dir
,
34 syncable::ModelNeutralWriteTransaction
* trans
,
36 const SyncEntityList
& applicable_updates
,
37 sessions::StatusController
* status
,
38 UpdateCounters
* counters
);
40 // Tombstones all entries of |type| whose versions are older than
41 // |version_watermark| unless they are type root or unsynced/unapplied.
42 void ExpireEntriesByVersion(syncable::Directory
* dir
,
43 syncable::ModelNeutralWriteTransaction
* trans
,
45 int64 version_watermark
);
49 #endif // SYNC_ENGINE_PROCESS_UPDATES_UTIL_H_