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
3 // found in the LICENSE file.
4
5 #include "components/sync_driver/shared_change_processor_ref.h"
6
7 namespace sync_driver {
8
SharedChangeProcessorRef(const scoped_refptr<SharedChangeProcessor> & change_processor)9 SharedChangeProcessorRef::SharedChangeProcessorRef(
10 const scoped_refptr<SharedChangeProcessor>& change_processor)
11 : change_processor_(change_processor) {
12 DCHECK(change_processor_.get());
13 }
14
~SharedChangeProcessorRef()15 SharedChangeProcessorRef::~SharedChangeProcessorRef() {}
16
ProcessSyncChanges(const tracked_objects::Location & from_here,const syncer::SyncChangeList & change_list)17 syncer::SyncError SharedChangeProcessorRef::ProcessSyncChanges(
18 const tracked_objects::Location& from_here,
19 const syncer::SyncChangeList& change_list) {
20 return change_processor_->ProcessSyncChanges(from_here, change_list);
21 }
22
GetAllSyncData(syncer::ModelType type) const23 syncer::SyncDataList SharedChangeProcessorRef::GetAllSyncData(
24 syncer::ModelType type) const {
25 return change_processor_->GetAllSyncData(type);
26 }
27
UpdateDataTypeContext(syncer::ModelType type,syncer::SyncChangeProcessor::ContextRefreshStatus refresh_status,const std::string & context)28 syncer::SyncError SharedChangeProcessorRef::UpdateDataTypeContext(
29 syncer::ModelType type,
30 syncer::SyncChangeProcessor::ContextRefreshStatus refresh_status,
31 const std::string& context) {
32 return change_processor_->UpdateDataTypeContext(
33 type, refresh_status, context);
34 }
35
CreateAndUploadError(const tracked_objects::Location & from_here,const std::string & message)36 syncer::SyncError SharedChangeProcessorRef::CreateAndUploadError(
37 const tracked_objects::Location& from_here,
38 const std::string& message) {
39 return change_processor_->CreateAndUploadError(from_here, message);
40 }
41
42 } // namespace sync_driver
43