| 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 "components/sync/engine_impl/directory_update_handler.h" | 5 #include "components/sync/engine_impl/directory_update_handler.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "components/sync/base/data_type_histogram.h" | 12 #include "components/sync/base/data_type_histogram.h" |
| 13 #include "components/sync/engine_impl/conflict_resolver.h" | 13 #include "components/sync/engine_impl/conflict_resolver.h" |
| 14 #include "components/sync/engine_impl/cycle/directory_type_debug_info_emitter.h" | 14 #include "components/sync/engine_impl/cycle/data_type_debug_info_emitter.h" |
| 15 #include "components/sync/engine_impl/cycle/status_controller.h" | 15 #include "components/sync/engine_impl/cycle/status_controller.h" |
| 16 #include "components/sync/engine_impl/update_applicator.h" | 16 #include "components/sync/engine_impl/update_applicator.h" |
| 17 #include "components/sync/syncable/directory.h" | 17 #include "components/sync/syncable/directory.h" |
| 18 #include "components/sync/syncable/model_neutral_mutable_entry.h" | 18 #include "components/sync/syncable/model_neutral_mutable_entry.h" |
| 19 #include "components/sync/syncable/syncable_changes_version.h" | 19 #include "components/sync/syncable/syncable_changes_version.h" |
| 20 #include "components/sync/syncable/syncable_model_neutral_write_transaction.h" | 20 #include "components/sync/syncable/syncable_model_neutral_write_transaction.h" |
| 21 #include "components/sync/syncable/syncable_write_transaction.h" | 21 #include "components/sync/syncable/syncable_write_transaction.h" |
| 22 | 22 |
| 23 namespace syncer { | 23 namespace syncer { |
| 24 | 24 |
| 25 using syncable::SYNCER; | 25 using syncable::SYNCER; |
| 26 | 26 |
| 27 DirectoryUpdateHandler::DirectoryUpdateHandler( | 27 DirectoryUpdateHandler::DirectoryUpdateHandler( |
| 28 syncable::Directory* dir, | 28 syncable::Directory* dir, |
| 29 ModelType type, | 29 ModelType type, |
| 30 scoped_refptr<ModelSafeWorker> worker, | 30 scoped_refptr<ModelSafeWorker> worker, |
| 31 DirectoryTypeDebugInfoEmitter* debug_info_emitter) | 31 DataTypeDebugInfoEmitter* debug_info_emitter) |
| 32 : dir_(dir), | 32 : dir_(dir), |
| 33 type_(type), | 33 type_(type), |
| 34 worker_(worker), | 34 worker_(worker), |
| 35 debug_info_emitter_(debug_info_emitter) {} | 35 debug_info_emitter_(debug_info_emitter) {} |
| 36 | 36 |
| 37 DirectoryUpdateHandler::~DirectoryUpdateHandler() {} | 37 DirectoryUpdateHandler::~DirectoryUpdateHandler() {} |
| 38 | 38 |
| 39 bool DirectoryUpdateHandler::IsInitialSyncEnded() const { | 39 bool DirectoryUpdateHandler::IsInitialSyncEnded() const { |
| 40 return dir_->InitialSyncEndedForType(type_); | 40 return dir_->InitialSyncEndedForType(type_); |
| 41 } | 41 } |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 new_gc_directive.version_watermark())) { | 304 new_gc_directive.version_watermark())) { |
| 305 ExpireEntriesByVersion(dir_, trans, type_, | 305 ExpireEntriesByVersion(dir_, trans, type_, |
| 306 new_gc_directive.version_watermark()); | 306 new_gc_directive.version_watermark()); |
| 307 } | 307 } |
| 308 | 308 |
| 309 cached_gc_directive_ = | 309 cached_gc_directive_ = |
| 310 base::MakeUnique<sync_pb::GarbageCollectionDirective>(new_gc_directive); | 310 base::MakeUnique<sync_pb::GarbageCollectionDirective>(new_gc_directive); |
| 311 } | 311 } |
| 312 | 312 |
| 313 } // namespace syncer | 313 } // namespace syncer |
| OLD | NEW |