remote_change_processor_wrapper.cc revision 5c02ac1a9c1b504631c0a3d2b6e737b5d738bae1
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 "chrome/browser/sync_file_system/drive_backend/remote_change_processor_wrapper.h" 6 7#include "base/memory/weak_ptr.h" 8#include "chrome/browser/sync_file_system/remote_change_processor.h" 9 10namespace sync_file_system { 11namespace drive_backend { 12 13RemoteChangeProcessorWrapper::RemoteChangeProcessorWrapper( 14 RemoteChangeProcessor* remote_change_processor) 15 : remote_change_processor_(remote_change_processor) {} 16 17void RemoteChangeProcessorWrapper::PrepareForProcessRemoteChange( 18 const fileapi::FileSystemURL& url, 19 const RemoteChangeProcessor::PrepareChangeCallback& callback) { 20 remote_change_processor_->PrepareForProcessRemoteChange(url, callback); 21} 22 23void 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); 30} 31 32void 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); 38} 39 40void RemoteChangeProcessorWrapper::RecordFakeLocalChange( 41 const fileapi::FileSystemURL& url, 42 const FileChange& change, 43 const SyncStatusCallback& callback) { 44 remote_change_processor_->RecordFakeLocalChange(url, change, callback); 45} 46 47} // namespace drive_backend 48} // namespace sync_file_system 49