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_FILE_SYSTEM_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 class SyncEventObserver; | 41 class SyncEventObserver; |
42 class SyncProcessRunner; | 42 class SyncProcessRunner; |
43 | 43 |
44 class SyncFileSystemService | 44 class SyncFileSystemService |
45 : public KeyedService, | 45 : public KeyedService, |
46 public ProfileSyncServiceObserver, | 46 public ProfileSyncServiceObserver, |
47 public FileStatusObserver, | 47 public FileStatusObserver, |
48 public content::NotificationObserver, | 48 public content::NotificationObserver, |
49 public base::SupportsWeakPtr<SyncFileSystemService> { | 49 public base::SupportsWeakPtr<SyncFileSystemService> { |
50 public: | 50 public: |
51 typedef base::Callback<void(const base::ListValue* files)> DumpFilesCallback; | 51 typedef base::Callback<void(const base::ListValue&)> DumpFilesCallback; |
52 | 52 |
53 // KeyedService overrides. | 53 // KeyedService overrides. |
54 virtual void Shutdown() OVERRIDE; | 54 virtual void Shutdown() OVERRIDE; |
55 | 55 |
56 void InitializeForApp( | 56 void InitializeForApp( |
57 fileapi::FileSystemContext* file_system_context, | 57 fileapi::FileSystemContext* file_system_context, |
58 const GURL& app_origin, | 58 const GURL& app_origin, |
59 const SyncStatusCallback& callback); | 59 const SyncStatusCallback& callback); |
60 | 60 |
61 SyncServiceState GetSyncServiceState(); | 61 SyncServiceState GetSyncServiceState(); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 void DidInitializeFileSystem(const GURL& app_origin, | 96 void DidInitializeFileSystem(const GURL& app_origin, |
97 const SyncStatusCallback& callback, | 97 const SyncStatusCallback& callback, |
98 SyncStatusCode status); | 98 SyncStatusCode status); |
99 void DidRegisterOrigin(const GURL& app_origin, | 99 void DidRegisterOrigin(const GURL& app_origin, |
100 const SyncStatusCallback& callback, | 100 const SyncStatusCallback& callback, |
101 SyncStatusCode status); | 101 SyncStatusCode status); |
102 | 102 |
103 void DidInitializeFileSystemForDump(const GURL& app_origin, | 103 void DidInitializeFileSystemForDump(const GURL& app_origin, |
104 const DumpFilesCallback& callback, | 104 const DumpFilesCallback& callback, |
105 SyncStatusCode status); | 105 SyncStatusCode status); |
| 106 void DidDumpFiles(const GURL& app_origin, |
| 107 const DumpFilesCallback& callback, |
| 108 scoped_ptr<base::ListValue> files); |
106 | 109 |
107 // Overrides sync_enabled_ setting. This should be called only by tests. | 110 // Overrides sync_enabled_ setting. This should be called only by tests. |
108 void SetSyncEnabledForTesting(bool enabled); | 111 void SetSyncEnabledForTesting(bool enabled); |
109 | 112 |
110 void DidGetLocalChangeStatus(const SyncFileStatusCallback& callback, | 113 void DidGetLocalChangeStatus(const SyncFileStatusCallback& callback, |
111 SyncStatusCode status, | 114 SyncStatusCode status, |
112 bool has_pending_local_changes); | 115 bool has_pending_local_changes); |
113 | 116 |
114 void OnRemoteServiceStateUpdated(RemoteServiceState state, | 117 void OnRemoteServiceStateUpdated(RemoteServiceState state, |
115 const std::string& description); | 118 const std::string& description); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 bool sync_enabled_; | 172 bool sync_enabled_; |
170 | 173 |
171 ObserverList<SyncEventObserver> observers_; | 174 ObserverList<SyncEventObserver> observers_; |
172 | 175 |
173 DISALLOW_COPY_AND_ASSIGN(SyncFileSystemService); | 176 DISALLOW_COPY_AND_ASSIGN(SyncFileSystemService); |
174 }; | 177 }; |
175 | 178 |
176 } // namespace sync_file_system | 179 } // namespace sync_file_system |
177 | 180 |
178 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ | 181 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ |
OLD | NEW |