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_REMOTE_FILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 SyncFileMetadata metadata; | 104 SyncFileMetadata metadata; |
105 }; | 105 }; |
106 | 106 |
107 enum UninstallFlag { | 107 enum UninstallFlag { |
108 UNINSTALL_AND_PURGE_REMOTE, | 108 UNINSTALL_AND_PURGE_REMOTE, |
109 UNINSTALL_AND_KEEP_REMOTE, | 109 UNINSTALL_AND_KEEP_REMOTE, |
110 }; | 110 }; |
111 | 111 |
112 // For GetOriginStatusMap. | 112 // For GetOriginStatusMap. |
113 typedef std::map<GURL, std::string> OriginStatusMap; | 113 typedef std::map<GURL, std::string> OriginStatusMap; |
114 typedef base::Callback<void(const OriginStatusMap& status_map)> | |
115 StatusMapCallback; | |
tzik
2014/05/22 03:51:13
# As we chatted locally.
Can we change the paramet
peria
2014/05/22 04:37:58
Done.
| |
114 | 116 |
115 // For GetRemoteVersions. | 117 // For GetRemoteVersions. |
116 typedef base::Callback<void(SyncStatusCode status, | 118 typedef base::Callback<void(SyncStatusCode status, |
117 const std::vector<Version>& versions)> | 119 const std::vector<Version>& versions)> |
118 RemoteVersionsCallback; | 120 RemoteVersionsCallback; |
119 typedef base::Callback<void(SyncStatusCode status, | 121 typedef base::Callback<void(SyncStatusCode status, |
120 webkit_blob::ScopedFile downloaded)> | 122 webkit_blob::ScopedFile downloaded)> |
121 DownloadVersionCallback; | 123 DownloadVersionCallback; |
122 | 124 |
123 // For DumpFile. | 125 // For DumpFile. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 | 187 |
186 // Returns true if the file |url| is marked conflicted in the remote service. | 188 // Returns true if the file |url| is marked conflicted in the remote service. |
187 virtual bool IsConflicting(const fileapi::FileSystemURL& url) = 0; | 189 virtual bool IsConflicting(const fileapi::FileSystemURL& url) = 0; |
188 | 190 |
189 // Returns the current remote service state (should equal to the value | 191 // Returns the current remote service state (should equal to the value |
190 // returned by the last OnRemoteServiceStateUpdated notification. | 192 // returned by the last OnRemoteServiceStateUpdated notification. |
191 virtual RemoteServiceState GetCurrentState() const = 0; | 193 virtual RemoteServiceState GetCurrentState() const = 0; |
192 | 194 |
193 // Returns all origins along with an arbitrary string description of their | 195 // Returns all origins along with an arbitrary string description of their |
194 // corresponding sync statuses. | 196 // corresponding sync statuses. |
195 virtual void GetOriginStatusMap(OriginStatusMap* status_map) = 0; | 197 virtual void GetOriginStatusMap(const StatusMapCallback& callback) = 0; |
196 | 198 |
197 // Returns file metadata for |origin| to call |callback|. | 199 // Returns file metadata for |origin| to call |callback|. |
198 virtual void DumpFiles(const GURL& origin, | 200 virtual void DumpFiles(const GURL& origin, |
199 const ListCallback& callback) = 0; | 201 const ListCallback& callback) = 0; |
200 | 202 |
201 // Returns the dump of internal database. | 203 // Returns the dump of internal database. |
202 virtual void DumpDatabase(const ListCallback& callback) = 0; | 204 virtual void DumpDatabase(const ListCallback& callback) = 0; |
203 | 205 |
204 // Enables or disables the background sync. | 206 // Enables or disables the background sync. |
205 // Setting this to false should disable the synchronization (and make | 207 // Setting this to false should disable the synchronization (and make |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
239 | 241 |
240 virtual void PromoteDemotedChanges() = 0; | 242 virtual void PromoteDemotedChanges() = 0; |
241 | 243 |
242 private: | 244 private: |
243 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); | 245 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); |
244 }; | 246 }; |
245 | 247 |
246 } // namespace sync_file_system | 248 } // namespace sync_file_system |
247 | 249 |
248 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ | 250 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ |
OLD | NEW |