| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 // Setting this to false should disable the synchronization (and make | 199 // Setting this to false should disable the synchronization (and make |
| 200 // the service state to REMOTE_SERVICE_DISABLED), while setting this to | 200 // the service state to REMOTE_SERVICE_DISABLED), while setting this to |
| 201 // true does not necessarily mean the service is actually turned on | 201 // true does not necessarily mean the service is actually turned on |
| 202 // (for example if Chrome is offline the service state will become | 202 // (for example if Chrome is offline the service state will become |
| 203 // REMOTE_SERVICE_TEMPORARY_UNAVAILABLE). | 203 // REMOTE_SERVICE_TEMPORARY_UNAVAILABLE). |
| 204 virtual void SetSyncEnabled(bool enabled) = 0; | 204 virtual void SetSyncEnabled(bool enabled) = 0; |
| 205 | 205 |
| 206 // Sets the conflict resolution policy. Returns SYNC_STATUS_OK on success, | 206 // Sets the conflict resolution policy. Returns SYNC_STATUS_OK on success, |
| 207 // or returns an error code if the given policy is not supported or had | 207 // or returns an error code if the given policy is not supported or had |
| 208 // an error. | 208 // an error. |
| 209 virtual SyncStatusCode SetDefaultConflictResolutionPolicy( |
| 210 ConflictResolutionPolicy policy) = 0; |
| 209 virtual SyncStatusCode SetConflictResolutionPolicy( | 211 virtual SyncStatusCode SetConflictResolutionPolicy( |
| 212 const GURL& origin, |
| 210 ConflictResolutionPolicy policy) = 0; | 213 ConflictResolutionPolicy policy) = 0; |
| 211 | 214 |
| 212 // Gets the conflict resolution policy. | 215 // Gets the conflict resolution policy. |
| 213 virtual ConflictResolutionPolicy GetConflictResolutionPolicy() const = 0; | 216 virtual ConflictResolutionPolicy GetDefaultConflictResolutionPolicy() |
| 217 const = 0; |
| 218 virtual ConflictResolutionPolicy GetConflictResolutionPolicy( |
| 219 const GURL& origin) const = 0; |
| 214 | 220 |
| 215 // Returns a list of remote versions with their metadata. | 221 // Returns a list of remote versions with their metadata. |
| 216 // This method is typically called for a file which is in conflicting state. | 222 // This method is typically called for a file which is in conflicting state. |
| 217 virtual void GetRemoteVersions( | 223 virtual void GetRemoteVersions( |
| 218 const fileapi::FileSystemURL& url, | 224 const fileapi::FileSystemURL& url, |
| 219 const RemoteVersionsCallback& callback) = 0; | 225 const RemoteVersionsCallback& callback) = 0; |
| 220 | 226 |
| 221 // Downloads the remote image. The |id| should be the ID string for a | 227 // Downloads the remote image. The |id| should be the ID string for a |
| 222 // version returned by GetRemoteVersions. | 228 // version returned by GetRemoteVersions. |
| 223 virtual void DownloadRemoteVersion( | 229 virtual void DownloadRemoteVersion( |
| 224 const fileapi::FileSystemURL& url, | 230 const fileapi::FileSystemURL& url, |
| 225 const std::string& id, | 231 const std::string& id, |
| 226 const DownloadVersionCallback& callback) = 0; | 232 const DownloadVersionCallback& callback) = 0; |
| 227 | 233 |
| 228 virtual void PromoteDemotedChanges() = 0; | 234 virtual void PromoteDemotedChanges() = 0; |
| 229 | 235 |
| 230 private: | 236 private: |
| 231 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); | 237 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); |
| 232 }; | 238 }; |
| 233 | 239 |
| 234 } // namespace sync_file_system | 240 } // namespace sync_file_system |
| 235 | 241 |
| 236 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ | 242 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ |
| OLD | NEW |