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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
273 void CompleteRemoteSync( | 273 void CompleteRemoteSync( |
274 scoped_ptr<ProcessRemoteChangeParam> param, | 274 scoped_ptr<ProcessRemoteChangeParam> param, |
275 fileapi::SyncStatusCode status); | 275 fileapi::SyncStatusCode status); |
276 void AbortRemoteSync( | 276 void AbortRemoteSync( |
277 scoped_ptr<ProcessRemoteChangeParam> param, | 277 scoped_ptr<ProcessRemoteChangeParam> param, |
278 fileapi::SyncStatusCode status); | 278 fileapi::SyncStatusCode status); |
279 void FinalizeRemoteSync( | 279 void FinalizeRemoteSync( |
280 scoped_ptr<ProcessRemoteChangeParam> param, | 280 scoped_ptr<ProcessRemoteChangeParam> param, |
281 fileapi::SyncStatusCode status); | 281 fileapi::SyncStatusCode status); |
282 | 282 |
283 void AppendNewRemoteChange(const GURL& origin, | 283 bool AppendNewRemoteChange(const GURL& origin, |
kinuko
2012/12/04 10:23:27
Can you add a short comment when this returns true
tzik
2012/12/04 10:32:03
Done. Wrote comments in .h.
| |
284 const google_apis::DocumentEntry& entry, | 284 const google_apis::DocumentEntry& entry, |
285 int64 changestamp, | 285 int64 changestamp, |
286 RemoteSyncType sync_type); | 286 RemoteSyncType sync_type); |
287 void RemoveRemoteChange(const fileapi::FileSystemURL& url); | 287 void RemoveRemoteChange(const fileapi::FileSystemURL& url); |
288 void MaybeMarkAsIncrementalSyncOrigin(const GURL& origin); | 288 void MaybeMarkAsIncrementalSyncOrigin(const GURL& origin); |
289 | 289 |
290 // This returns false if no change is found for the |url|. | 290 // This returns false if no change is found for the |url|. |
291 bool GetPendingChangeForFileSystemURL(const fileapi::FileSystemURL& url, | 291 bool GetPendingChangeForFileSystemURL(const fileapi::FileSystemURL& url, |
292 RemoteChange* change) const; | 292 RemoteChange* change) const; |
293 | 293 |
294 // A wrapper implementation to GDataErrorCodeToSyncStatusCode which returns | 294 // A wrapper implementation to GDataErrorCodeToSyncStatusCode which returns |
295 // authentication error if the user is not signed in. | 295 // authentication error if the user is not signed in. |
296 fileapi::SyncStatusCode GDataErrorCodeToSyncStatusCodeWrapper( | 296 fileapi::SyncStatusCode GDataErrorCodeToSyncStatusCodeWrapper( |
297 google_apis::GDataErrorCode error) const; | 297 google_apis::GDataErrorCode error) const; |
298 | 298 |
299 FilePath temporary_file_dir_; | 299 FilePath temporary_file_dir_; |
300 | 300 |
301 void FetchChangesForIncrementalSync(); | 301 void FetchChangesForIncrementalSync(); |
302 void DidFetchChangesForIncrementalSync( | 302 void DidFetchChangesForIncrementalSync( |
303 scoped_ptr<TaskToken> token, | 303 scoped_ptr<TaskToken> token, |
304 bool queue_was_updated, | |
kinuko
2012/12/04 10:23:27
had_new_changes maybe? (the term 'queue' sounds a
tzik
2012/12/04 10:32:03
Done.
| |
304 google_apis::GDataErrorCode error, | 305 google_apis::GDataErrorCode error, |
305 scoped_ptr<google_apis::DocumentFeed> changes); | 306 scoped_ptr<google_apis::DocumentFeed> changes); |
306 bool GetOriginForEntry(const google_apis::DocumentEntry& entry, GURL* origin); | 307 bool GetOriginForEntry(const google_apis::DocumentEntry& entry, GURL* origin); |
307 void SchedulePolling(); | 308 void SchedulePolling(); |
308 | 309 |
309 scoped_ptr<DriveMetadataStore> metadata_store_; | 310 scoped_ptr<DriveMetadataStore> metadata_store_; |
310 scoped_ptr<DriveFileSyncClient> sync_client_; | 311 scoped_ptr<DriveFileSyncClient> sync_client_; |
311 | 312 |
312 fileapi::SyncStatusCode last_operation_status_; | 313 fileapi::SyncStatusCode last_operation_status_; |
313 RemoteServiceState state_; | 314 RemoteServiceState state_; |
(...skipping 22 matching lines...) Expand all Loading... | |
336 // Use WeakPtrFactory instead of SupportsWeakPtr to revoke the weak pointer | 337 // Use WeakPtrFactory instead of SupportsWeakPtr to revoke the weak pointer |
337 // in |token_|. | 338 // in |token_|. |
338 base::WeakPtrFactory<DriveFileSyncService> weak_factory_; | 339 base::WeakPtrFactory<DriveFileSyncService> weak_factory_; |
339 | 340 |
340 DISALLOW_COPY_AND_ASSIGN(DriveFileSyncService); | 341 DISALLOW_COPY_AND_ASSIGN(DriveFileSyncService); |
341 }; | 342 }; |
342 | 343 |
343 } // namespace sync_file_system | 344 } // namespace sync_file_system |
344 | 345 |
345 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_SERVICE_H_ | 346 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_SERVICE_H_ |
OLD | NEW |