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_DRIVE_FILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_SERVICE_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 google_apis::DocumentEntry* entry, | 280 google_apis::DocumentEntry* entry, |
281 int64 changestamp, | 281 int64 changestamp, |
282 RemoteSyncType sync_type); | 282 RemoteSyncType sync_type); |
283 void CancelRemoteChange(const fileapi::FileSystemURL& url); | 283 void CancelRemoteChange(const fileapi::FileSystemURL& url); |
284 void MaybeMarkAsIncrementalSyncOrigin(const GURL& origin); | 284 void MaybeMarkAsIncrementalSyncOrigin(const GURL& origin); |
285 | 285 |
286 // This returns false if no change is found for the |url|. | 286 // This returns false if no change is found for the |url|. |
287 bool GetPendingChangeForFileSystemURL(const fileapi::FileSystemURL& url, | 287 bool GetPendingChangeForFileSystemURL(const fileapi::FileSystemURL& url, |
288 RemoteChange* change) const; | 288 RemoteChange* change) const; |
289 | 289 |
| 290 // A wrapper implementation to GDataErrorCodeToSyncStatusCode which returns |
| 291 // authentication error if the user is not signed in. |
| 292 fileapi::SyncStatusCode GDataErrorCodeToSyncStatusCodeWrapper( |
| 293 google_apis::GDataErrorCode error) const; |
| 294 |
290 FilePath temporary_file_dir_; | 295 FilePath temporary_file_dir_; |
291 | 296 |
292 scoped_ptr<DriveMetadataStore> metadata_store_; | 297 scoped_ptr<DriveMetadataStore> metadata_store_; |
293 scoped_ptr<DriveFileSyncClient> sync_client_; | 298 scoped_ptr<DriveFileSyncClient> sync_client_; |
294 | 299 |
295 fileapi::SyncStatusCode last_operation_status_; | 300 fileapi::SyncStatusCode last_operation_status_; |
296 RemoteServiceState state_; | 301 RemoteServiceState state_; |
297 std::deque<base::Closure> pending_tasks_; | 302 std::deque<base::Closure> pending_tasks_; |
298 | 303 |
299 int64 largest_changestamp_; | 304 int64 largest_changestamp_; |
(...skipping 14 matching lines...) Expand all Loading... |
314 // Use WeakPtrFactory instead of SupportsWeakPtr to revoke the weak pointer | 319 // Use WeakPtrFactory instead of SupportsWeakPtr to revoke the weak pointer |
315 // in |token_|. | 320 // in |token_|. |
316 base::WeakPtrFactory<DriveFileSyncService> weak_factory_; | 321 base::WeakPtrFactory<DriveFileSyncService> weak_factory_; |
317 | 322 |
318 DISALLOW_COPY_AND_ASSIGN(DriveFileSyncService); | 323 DISALLOW_COPY_AND_ASSIGN(DriveFileSyncService); |
319 }; | 324 }; |
320 | 325 |
321 } // namespace sync_file_system | 326 } // namespace sync_file_system |
322 | 327 |
323 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_SERVICE_H_ | 328 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_SERVICE_H_ |
OLD | NEW |