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.
5 #include "chrome/browser/sync_file_system/drive_backend/remote_change_processor_wrapper.h"
7 #include "base/memory/weak_ptr.h"
8 #include "chrome/browser/sync_file_system/remote_change_processor.h"
10 namespace sync_file_system {
11 namespace drive_backend {
13 RemoteChangeProcessorWrapper::RemoteChangeProcessorWrapper(
14 RemoteChangeProcessor* remote_change_processor)
15 : remote_change_processor_(remote_change_processor) {}
17 void RemoteChangeProcessorWrapper::PrepareForProcessRemoteChange(
18 const fileapi::FileSystemURL& url,
19 const RemoteChangeProcessor::PrepareChangeCallback& callback) {
20 remote_change_processor_->PrepareForProcessRemoteChange(url, callback);
23 void RemoteChangeProcessorWrapper::ApplyRemoteChange(
24 const FileChange& change,
25 const base::FilePath& local_path,
26 const fileapi::FileSystemURL& url,
27 const SyncStatusCallback& callback) {
28 remote_change_processor_->ApplyRemoteChange(
29 change, local_path, url, callback);
32 void RemoteChangeProcessorWrapper::FinalizeRemoteSync(
33 const fileapi::FileSystemURL& url,
34 bool clear_local_changes,
35 const base::Closure& completion_callback) {
36 remote_change_processor_->FinalizeRemoteSync(
37 url, clear_local_changes, completion_callback);
40 void RemoteChangeProcessorWrapper::RecordFakeLocalChange(
41 const fileapi::FileSystemURL& url,
42 const FileChange& change,
43 const SyncStatusCallback& callback) {
44 remote_change_processor_->RecordFakeLocalChange(url, change, callback);
47 } // namespace drive_backend
48 } // namespace sync_file_system