OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "sync/engine/directory_update_handler.h" | 5 #include "sync/engine/directory_update_handler.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include <vector> | 9 #include <vector> |
8 | 10 |
9 #include "sync/engine/conflict_resolver.h" | 11 #include "sync/engine/conflict_resolver.h" |
10 #include "sync/engine/process_updates_util.h" | 12 #include "sync/engine/process_updates_util.h" |
11 #include "sync/engine/update_applicator.h" | 13 #include "sync/engine/update_applicator.h" |
12 #include "sync/sessions/directory_type_debug_info_emitter.h" | 14 #include "sync/sessions/directory_type_debug_info_emitter.h" |
13 #include "sync/syncable/directory.h" | 15 #include "sync/syncable/directory.h" |
14 #include "sync/syncable/model_neutral_mutable_entry.h" | 16 #include "sync/syncable/model_neutral_mutable_entry.h" |
15 #include "sync/syncable/syncable_changes_version.h" | 17 #include "sync/syncable/syncable_changes_version.h" |
16 #include "sync/syncable/syncable_model_neutral_write_transaction.h" | 18 #include "sync/syncable/syncable_model_neutral_write_transaction.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 debug_info_emitter_->EmitStatusCountersUpdate(); | 141 debug_info_emitter_->EmitStatusCountersUpdate(); |
140 } | 142 } |
141 | 143 |
142 PostApplyUpdates(); | 144 PostApplyUpdates(); |
143 } | 145 } |
144 | 146 |
145 SyncerError DirectoryUpdateHandler::ApplyUpdatesImpl( | 147 SyncerError DirectoryUpdateHandler::ApplyUpdatesImpl( |
146 sessions::StatusController* status) { | 148 sessions::StatusController* status) { |
147 syncable::WriteTransaction trans(FROM_HERE, syncable::SYNCER, dir_); | 149 syncable::WriteTransaction trans(FROM_HERE, syncable::SYNCER, dir_); |
148 | 150 |
149 std::vector<int64> handles; | 151 std::vector<int64_t> handles; |
150 dir_->GetUnappliedUpdateMetaHandles( | 152 dir_->GetUnappliedUpdateMetaHandles( |
151 &trans, | 153 &trans, |
152 FullModelTypeSet(type_), | 154 FullModelTypeSet(type_), |
153 &handles); | 155 &handles); |
154 | 156 |
155 // First set of update application passes. | 157 // First set of update application passes. |
156 UpdateApplicator applicator(dir_->GetCryptographer(&trans)); | 158 UpdateApplicator applicator(dir_->GetCryptographer(&trans)); |
157 applicator.AttemptApplications(&trans, handles); | 159 applicator.AttemptApplications(&trans, handles); |
158 | 160 |
159 // The old StatusController counters. | 161 // The old StatusController counters. |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 new_gc_directive.version_watermark())) { | 307 new_gc_directive.version_watermark())) { |
306 ExpireEntriesByVersion(dir_, trans, type_, | 308 ExpireEntriesByVersion(dir_, trans, type_, |
307 new_gc_directive.version_watermark()); | 309 new_gc_directive.version_watermark()); |
308 } | 310 } |
309 | 311 |
310 cached_gc_directive_.reset( | 312 cached_gc_directive_.reset( |
311 new sync_pb::GarbageCollectionDirective(new_gc_directive)); | 313 new sync_pb::GarbageCollectionDirective(new_gc_directive)); |
312 } | 314 } |
313 | 315 |
314 } // namespace syncer | 316 } // namespace syncer |
OLD | NEW |