OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_EVENT_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_EVENT_OBSERVER_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_EVENT_OBSERVER_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_EVENT_OBSERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/sync_file_system/file_status_observer.h" | 10 #include "chrome/browser/sync_file_system/file_status_observer.h" |
11 #include "chrome/browser/sync_file_system/sync_service_state.h" | 11 #include "chrome/browser/sync_file_system/sync_service_state.h" |
12 | 12 |
13 class GURL; | 13 class GURL; |
14 | 14 |
15 namespace fileapi { | 15 namespace storage { |
16 class FileSystemURL; | 16 class FileSystemURL; |
17 } | 17 } |
18 | 18 |
19 namespace sync_file_system { | 19 namespace sync_file_system { |
20 | 20 |
21 class SyncEventObserver { | 21 class SyncEventObserver { |
22 public: | 22 public: |
23 SyncEventObserver() {} | 23 SyncEventObserver() {} |
24 virtual ~SyncEventObserver() {} | 24 virtual ~SyncEventObserver() {} |
25 | 25 |
26 // Reports there was a state change in the sync file system backend. | 26 // Reports there was a state change in the sync file system backend. |
27 // If |app_origin| is empty, then broadcast to all registered apps. | 27 // If |app_origin| is empty, then broadcast to all registered apps. |
28 virtual void OnSyncStateUpdated(const GURL& app_origin, | 28 virtual void OnSyncStateUpdated(const GURL& app_origin, |
29 SyncServiceState state, | 29 SyncServiceState state, |
30 const std::string& description) = 0; | 30 const std::string& description) = 0; |
31 | 31 |
32 // Reports the file |url| was updated and resulted in |result| | 32 // Reports the file |url| was updated and resulted in |result| |
33 // by the sync file system backend. | 33 // by the sync file system backend. |
34 virtual void OnFileSynced(const fileapi::FileSystemURL& url, | 34 virtual void OnFileSynced(const storage::FileSystemURL& url, |
35 SyncFileStatus status, | 35 SyncFileStatus status, |
36 SyncAction action, | 36 SyncAction action, |
37 SyncDirection direction) = 0; | 37 SyncDirection direction) = 0; |
38 | 38 |
39 private: | 39 private: |
40 DISALLOW_COPY_AND_ASSIGN(SyncEventObserver); | 40 DISALLOW_COPY_AND_ASSIGN(SyncEventObserver); |
41 }; | 41 }; |
42 | 42 |
43 } // namespace sync_file_system | 43 } // namespace sync_file_system |
44 | 44 |
45 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_EVENT_OBSERVER_H_ | 45 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_EVENT_OBSERVER_H_ |
OLD | NEW |