summaryrefslogtreecommitdiffstats
path: root/components/sync_driver/shared_change_processor_ref.cc
blob: 0ba26057f402ef6a5b4ea6afc06a587431e69b98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/sync_driver/shared_change_processor_ref.h"

namespace sync_driver {

SharedChangeProcessorRef::SharedChangeProcessorRef(
    const scoped_refptr<SharedChangeProcessor>& change_processor)
    : change_processor_(change_processor) {
  DCHECK(change_processor_.get());
}

SharedChangeProcessorRef::~SharedChangeProcessorRef() {}

syncer::SyncError SharedChangeProcessorRef::ProcessSyncChanges(
    const tracked_objects::Location& from_here,
    const syncer::SyncChangeList& change_list) {
  return change_processor_->ProcessSyncChanges(from_here, change_list);
}

syncer::SyncDataList SharedChangeProcessorRef::GetAllSyncData(
    syncer::ModelType type) const {
  return change_processor_->GetAllSyncData(type);
}

syncer::SyncError SharedChangeProcessorRef::UpdateDataTypeContext(
    syncer::ModelType type,
    syncer::SyncChangeProcessor::ContextRefreshStatus refresh_status,
    const std::string& context) {
  return change_processor_->UpdateDataTypeContext(
      type, refresh_status, context);
}

syncer::SyncError SharedChangeProcessorRef::CreateAndUploadError(
    const tracked_objects::Location& from_here,
    const std::string& message) {
  return change_processor_->CreateAndUploadError(from_here, message);
}

}  // namespace sync_driver