| 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/internal_api/public/shared_model_type_processor.h" | 5 #include "sync/internal_api/public/shared_model_type_processor.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
| 15 #include "sync/engine/commit_queue.h" | 15 #include "sync/engine/commit_queue.h" |
| 16 #include "sync/internal_api/public/activation_context.h" | 16 #include "sync/internal_api/public/activation_context.h" |
| 17 #include "sync/internal_api/public/processor_entity_tracker.h" | 17 #include "sync/internal_api/public/processor_entity_tracker.h" |
| 18 #include "sync/syncable/syncable_util.h" | 18 #include "sync/syncable/syncable_util.h" |
| 19 | 19 |
| 20 namespace syncer_v2 { | 20 namespace syncer_v2 { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 class ModelTypeProcessorProxy : public ModelTypeProcessor { | 24 class ModelTypeProcessorProxy : public ModelTypeProcessor { |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 ProcessorEntityTracker* SharedModelTypeProcessor::CreateEntity( | 633 ProcessorEntityTracker* SharedModelTypeProcessor::CreateEntity( |
| 634 const EntityData& data) { | 634 const EntityData& data) { |
| 635 // Let the service define |client_tag| based on the entity data. | 635 // Let the service define |client_tag| based on the entity data. |
| 636 const std::string tag = service_->GetClientTag(data); | 636 const std::string tag = service_->GetClientTag(data); |
| 637 // This constraint may be relaxed in the future. | 637 // This constraint may be relaxed in the future. |
| 638 DCHECK_EQ(data.client_tag_hash, GetHashForTag(tag)); | 638 DCHECK_EQ(data.client_tag_hash, GetHashForTag(tag)); |
| 639 return CreateEntity(tag, data); | 639 return CreateEntity(tag, data); |
| 640 } | 640 } |
| 641 | 641 |
| 642 } // namespace syncer_v2 | 642 } // namespace syncer_v2 |
| OLD | NEW |