| 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 "components/sync/core/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/threading/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
| 15 #include "sync/engine/commit_queue.h" | 15 #include "components/sync/core/activation_context.h" |
| 16 #include "sync/internal_api/public/activation_context.h" | 16 #include "components/sync/core/processor_entity_tracker.h" |
| 17 #include "sync/internal_api/public/processor_entity_tracker.h" | 17 #include "components/sync/engine_impl/commit_queue.h" |
| 18 #include "sync/syncable/syncable_util.h" | 18 #include "components/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 { |
| 25 public: | 25 public: |
| 26 ModelTypeProcessorProxy( | 26 ModelTypeProcessorProxy( |
| 27 const base::WeakPtr<ModelTypeProcessor>& processor, | 27 const base::WeakPtr<ModelTypeProcessor>& processor, |
| 28 const scoped_refptr<base::SequencedTaskRunner>& processor_task_runner); | 28 const scoped_refptr<base::SequencedTaskRunner>& processor_task_runner); |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 ProcessorEntityTracker* SharedModelTypeProcessor::CreateEntity( | 681 ProcessorEntityTracker* SharedModelTypeProcessor::CreateEntity( |
| 682 const EntityData& data) { | 682 const EntityData& data) { |
| 683 // Let the service define |client_tag| based on the entity data. | 683 // Let the service define |client_tag| based on the entity data. |
| 684 const std::string tag = service_->GetClientTag(data); | 684 const std::string tag = service_->GetClientTag(data); |
| 685 // This constraint may be relaxed in the future. | 685 // This constraint may be relaxed in the future. |
| 686 DCHECK_EQ(data.client_tag_hash, GetHashForTag(tag)); | 686 DCHECK_EQ(data.client_tag_hash, GetHashForTag(tag)); |
| 687 return CreateEntity(tag, data); | 687 return CreateEntity(tag, data); |
| 688 } | 688 } |
| 689 | 689 |
| 690 } // namespace syncer_v2 | 690 } // namespace syncer_v2 |
| OLD | NEW |