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