OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_PROCESS_UPDATES_UTIL_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_PROCESS_UPDATES_UTIL_H_ |
6 #define COMPONENTS_SYNC_ENGINE_IMPL_PROCESS_UPDATES_UTIL_H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_PROCESS_UPDATES_UTIL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "components/sync/base/model_type.h" | 12 #include "components/sync/base/model_type.h" |
13 | 13 |
14 namespace sync_pb { | 14 namespace sync_pb { |
15 class SyncEntity; | 15 class SyncEntity; |
16 } | 16 } |
17 | 17 |
18 namespace syncer { | 18 namespace syncer { |
19 | 19 |
20 class StatusController; | 20 class StatusController; |
21 struct UpdateCounters; | 21 struct UpdateCounters; |
22 | 22 |
23 namespace syncable { | 23 namespace syncable { |
24 class ModelNeutralWriteTransaction; | 24 class ModelNeutralWriteTransaction; |
25 class Directory; | 25 class Directory; |
26 } | 26 } |
27 | 27 |
28 typedef std::vector<const sync_pb::SyncEntity*> SyncEntityList; | 28 using SyncEntityList = std::vector<const sync_pb::SyncEntity*>; |
29 | 29 |
30 // Processes all the updates associated with a single ModelType. | 30 // Processes all the updates associated with a single ModelType. |
31 void ProcessDownloadedUpdates(syncable::Directory* dir, | 31 void ProcessDownloadedUpdates(syncable::Directory* dir, |
32 syncable::ModelNeutralWriteTransaction* trans, | 32 syncable::ModelNeutralWriteTransaction* trans, |
33 ModelType type, | 33 ModelType type, |
34 const SyncEntityList& applicable_updates, | 34 const SyncEntityList& applicable_updates, |
35 StatusController* status, | 35 StatusController* status, |
36 UpdateCounters* counters); | 36 UpdateCounters* counters); |
37 | 37 |
38 // Tombstones all entries of |type| whose versions are older than | 38 // Tombstones all entries of |type| whose versions are older than |
39 // |version_watermark| unless they are type root or unsynced/unapplied. | 39 // |version_watermark| unless they are type root or unsynced/unapplied. |
40 void ExpireEntriesByVersion(syncable::Directory* dir, | 40 void ExpireEntriesByVersion(syncable::Directory* dir, |
41 syncable::ModelNeutralWriteTransaction* trans, | 41 syncable::ModelNeutralWriteTransaction* trans, |
42 ModelType type, | 42 ModelType type, |
43 int64_t version_watermark); | 43 int64_t version_watermark); |
44 | 44 |
45 } // namespace syncer | 45 } // namespace syncer |
46 | 46 |
47 #endif // COMPONENTS_SYNC_ENGINE_IMPL_PROCESS_UPDATES_UTIL_H_ | 47 #endif // COMPONENTS_SYNC_ENGINE_IMPL_PROCESS_UPDATES_UTIL_H_ |
OLD | NEW |