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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // storage backed by this service. | 129 // storage backed by this service. |
130 virtual LocalChangeProcessor* GetLocalChangeProcessor() = 0; | 130 virtual LocalChangeProcessor* GetLocalChangeProcessor() = 0; |
131 | 131 |
132 // Returns true if the file |url| is marked conflicted in the remote service. | 132 // Returns true if the file |url| is marked conflicted in the remote service. |
133 virtual bool IsConflicting(const fileapi::FileSystemURL& url) = 0; | 133 virtual bool IsConflicting(const fileapi::FileSystemURL& url) = 0; |
134 | 134 |
135 // Returns the current remote service state (should equal to the value | 135 // Returns the current remote service state (should equal to the value |
136 // returned by the last OnRemoteServiceStateUpdated notification. | 136 // returned by the last OnRemoteServiceStateUpdated notification. |
137 virtual RemoteServiceState GetCurrentState() const = 0; | 137 virtual RemoteServiceState GetCurrentState() const = 0; |
138 | 138 |
139 // Returns the service name that backs this remote_file_sync_service. | |
140 virtual const char* GetServiceName() const = 0; | |
141 | |
142 // Enables or disables the background sync. | 139 // Enables or disables the background sync. |
143 // Setting this to false should disable the synchronization (and make | 140 // Setting this to false should disable the synchronization (and make |
144 // the service state to REMOTE_SERVICE_DISABLED), while setting this to | 141 // the service state to REMOTE_SERVICE_DISABLED), while setting this to |
145 // true does not necessarily mean the service is actually turned on | 142 // true does not necessarily mean the service is actually turned on |
146 // (for example if Chrome is offline the service state will become | 143 // (for example if Chrome is offline the service state will become |
147 // REMOTE_SERVICE_TEMPORARY_UNAVAILABLE). | 144 // REMOTE_SERVICE_TEMPORARY_UNAVAILABLE). |
148 virtual void SetSyncEnabled(bool enabled) = 0; | 145 virtual void SetSyncEnabled(bool enabled) = 0; |
149 | 146 |
150 // Sets the conflict resolution policy. Returns SYNC_STATUS_OK on success, | 147 // Sets the conflict resolution policy. Returns SYNC_STATUS_OK on success, |
151 // or returns an error code if the given policy is not supported or had | 148 // or returns an error code if the given policy is not supported or had |
152 // an error. | 149 // an error. |
153 virtual SyncStatusCode SetConflictResolutionPolicy( | 150 virtual SyncStatusCode SetConflictResolutionPolicy( |
154 ConflictResolutionPolicy policy) = 0; | 151 ConflictResolutionPolicy policy) = 0; |
155 | 152 |
156 // Gets the conflict resolution policy. | 153 // Gets the conflict resolution policy. |
157 virtual ConflictResolutionPolicy GetConflictResolutionPolicy() const = 0; | 154 virtual ConflictResolutionPolicy GetConflictResolutionPolicy() const = 0; |
158 | 155 |
159 private: | 156 private: |
160 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); | 157 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); |
161 }; | 158 }; |
162 | 159 |
163 } // namespace sync_file_system | 160 } // namespace sync_file_system |
164 | 161 |
165 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ | 162 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ |
OLD | NEW |