OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CHANGE_PROCESSOR_H_ |
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CHANGE_PROCESSOR_H_ |
| 7 |
| 8 #include "base/callback_forward.h" |
| 9 |
| 10 namespace fileapi { |
| 11 class FileChange; |
| 12 class FileChangeList; |
| 13 class FileSystemURL |
| 14 } |
| 15 |
| 16 namespace sync_file_system { |
| 17 |
| 18 // Represents an interface to process one local change and applies |
| 19 // it to the remote server. |
| 20 // This interface is to be implemented/backed by RemoteSyncFileService. |
| 21 class LocalChangeProcessor { |
| 22 public: |
| 23 typedef base::Callback<void(fileapi::SyncStatusCode status)> StatusCallback; |
| 24 |
| 25 LocalChangeProcessor() {} |
| 26 virtual ~LocalChangeProcessor() {} |
| 27 |
| 28 // This is called to apply the local |change|. If the change type is |
| 29 // ADD_OR_UPDATE for a file, |local_path| needs to point to a |
| 30 // local file path that contains the latest file image. |
| 31 virtual void ApplyLocalChange( |
| 32 const fileapi::FileChange& change, |
| 33 const FilePath& local_path, |
| 34 const fileapi::FileSystemURL& url, |
| 35 const StatusCallback& callback) = 0; |
| 36 |
| 37 private: |
| 38 DISALLOW_COPY_AND_ASSIGN(LocalChangeProcessor); |
| 39 }; |
| 40 |
| 41 } // namespace sync_file_system |
| 42 |
| 43 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CHANGE_PROCESSOR_H_ |
OLD | NEW |