| 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 "sync/engine/conflict_resolver.h" | 7 #include "sync/engine/conflict_resolver.h" |
| 8 #include "sync/engine/process_updates_util.h" | 8 #include "sync/engine/process_updates_util.h" |
| 9 #include "sync/engine/update_applicator.h" | 9 #include "sync/engine/update_applicator.h" |
| 10 #include "sync/sessions/status_controller.h" | 10 #include "sync/sessions/directory_type_debug_info_emitter.h" |
| 11 #include "sync/syncable/directory.h" | 11 #include "sync/syncable/directory.h" |
| 12 #include "sync/syncable/syncable_model_neutral_write_transaction.h" | 12 #include "sync/syncable/syncable_model_neutral_write_transaction.h" |
| 13 #include "sync/syncable/syncable_write_transaction.h" | 13 #include "sync/syncable/syncable_write_transaction.h" |
| 14 | 14 |
| 15 namespace syncer { | 15 namespace syncer { |
| 16 | 16 |
| 17 using syncable::SYNCER; | 17 using syncable::SYNCER; |
| 18 | 18 |
| 19 DirectoryUpdateHandler::DirectoryUpdateHandler( | 19 DirectoryUpdateHandler::DirectoryUpdateHandler( |
| 20 syncable::Directory* dir, | 20 syncable::Directory* dir, |
| 21 ModelType type, | 21 ModelType type, |
| 22 scoped_refptr<ModelSafeWorker> worker) | 22 scoped_refptr<ModelSafeWorker> worker, |
| 23 DirectoryTypeDebugInfoEmitter* debug_info_emitter) |
| 23 : dir_(dir), | 24 : dir_(dir), |
| 24 type_(type), | 25 type_(type), |
| 25 worker_(worker) {} | 26 worker_(worker), |
| 27 debug_info_emitter_(debug_info_emitter) {} |
| 26 | 28 |
| 27 DirectoryUpdateHandler::~DirectoryUpdateHandler() {} | 29 DirectoryUpdateHandler::~DirectoryUpdateHandler() {} |
| 28 | 30 |
| 29 void DirectoryUpdateHandler::GetDownloadProgress( | 31 void DirectoryUpdateHandler::GetDownloadProgress( |
| 30 sync_pb::DataTypeProgressMarker* progress_marker) const { | 32 sync_pb::DataTypeProgressMarker* progress_marker) const { |
| 31 dir_->GetDownloadProgress(type_, progress_marker); | 33 dir_->GetDownloadProgress(type_, progress_marker); |
| 32 } | 34 } |
| 33 | 35 |
| 34 void DirectoryUpdateHandler::GetDataTypeContext( | 36 void DirectoryUpdateHandler::GetDataTypeContext( |
| 35 sync_pb::DataTypeContext* context) const { | 37 sync_pb::DataTypeContext* context) const { |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 new_gc_directive.version_watermark())) { | 229 new_gc_directive.version_watermark())) { |
| 228 ExpireEntriesByVersion(dir_, trans, type_, | 230 ExpireEntriesByVersion(dir_, trans, type_, |
| 229 new_gc_directive.version_watermark()); | 231 new_gc_directive.version_watermark()); |
| 230 } | 232 } |
| 231 | 233 |
| 232 cached_gc_directive_.reset( | 234 cached_gc_directive_.reset( |
| 233 new sync_pb::GarbageCollectionDirective(new_gc_directive)); | 235 new sync_pb::GarbageCollectionDirective(new_gc_directive)); |
| 234 } | 236 } |
| 235 | 237 |
| 236 } // namespace syncer | 238 } // namespace syncer |
| OLD | NEW |