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" | |
10 #include "chrome/browser/sync_file_system/sync_file_system_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 void AddObserver(RemoteChangeObserver* observer); | |
27 void RemoveObserver(RemoteChangeObserver* observer); | |
kinuko
2012/10/23 08:12:14
It might be ok to leave them pure virtual too.. th
tzik
2012/10/24 03:32:33
Done.
| |
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 StatusCallback& callback) = 0; | |
kinuko
2012/10/23 08:12:14
I think this should also let the caller know what
tzik
2012/10/24 03:32:33
Done.
| |
40 | |
41 protected: | |
42 void NotifyRemoteChangeAvailable(int64 pending_changes); | |
43 | |
44 private: | |
45 ObserverList<RemoteChangeObserver> observers_; | |
46 | |
47 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); | |
48 }; | |
49 | |
50 } // namespace sync_file_system | |
51 | |
52 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ | |
OLD | NEW |