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_REMOTE_FILE_SYNC_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "webkit/fileapi/syncable/sync_callbacks.h" |
| 10 |
| 11 class GURL; |
| 12 |
| 13 namespace sync_file_system { |
| 14 |
| 15 class RemoteChangeObserver; |
| 16 class RemoteChangeProcessor; |
| 17 |
| 18 // This class represents a backing service of the sync filesystem. |
| 19 // Owned by SyncFileSystemService. |
| 20 class RemoteFileSyncService { |
| 21 public: |
| 22 RemoteFileSyncService() {} |
| 23 virtual ~RemoteFileSyncService() {} |
| 24 |
| 25 virtual void AddObserver(RemoteChangeObserver* observer) = 0; |
| 26 virtual void RemoveObserver(RemoteChangeObserver* observer) = 0; |
| 27 |
| 28 // Registers |origin| to track remote side changes for the |origin|. |
| 29 virtual void RegisterOriginForTrackingChanges(const GURL& origin) = 0; |
| 30 |
| 31 // Unregisters |origin| to track remote side changes for the |origin|. |
| 32 virtual void UnregisterOriginForTrackingChanges(const GURL& origin) = 0; |
| 33 |
| 34 // Called by the sync engine to process one remote change. |
| 35 // After a change is processed |callback| will be called (to return |
| 36 // the control to the sync engine). |
| 37 virtual void ProcessChange(RemoteChangeProcessor* processor, |
| 38 fileapi::SyncCompletionCallback& callback) = 0; |
| 39 |
| 40 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); |
| 42 }; |
| 43 |
| 44 } // namespace sync_file_system |
| 45 |
| 46 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ |
OLD | NEW |