Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: webkit/fileapi/syncable/local_file_sync_context.h

Issue 11411352: Clear syncing flag after a remote or local sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: also check REMOTE_SERVICE_DISABLED state Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/fileapi/syncable/local_file_sync_context.h
diff --git a/webkit/fileapi/syncable/local_file_sync_context.h b/webkit/fileapi/syncable/local_file_sync_context.h
index 05cf6c7e68fb1e91185f6e09bd2544428a1ba7a3..1bc5b3a8ff685af86db169f36004068a0e03a5d5 100644
--- a/webkit/fileapi/syncable/local_file_sync_context.h
+++ b/webkit/fileapi/syncable/local_file_sync_context.h
@@ -76,11 +76,17 @@ class WEBKIT_STORAGE_EXPORT LocalFileSyncContext
void GetFileForLocalSync(FileSystemContext* file_system_context,
const LocalFileSyncInfoCallback& callback);
- // Notifies the sync context that the local sync has finished (either
- // successfully or with an error) for |url|.
+ // Clears all pending local changes for |url|. |done_callback| is called
+ // when the changes are cleared.
// This method must be called on UI thread.
- void FinalizeSyncForURL(FileSystemContext* file_system_context,
- const FileSystemURL& url);
+ void ClearChangesForURL(FileSystemContext* file_system_context,
+ const FileSystemURL& url,
+ const base::Closure& done_callback);
+
+ // A local or remote sync has been finished (either successfully or
+ // with an error). Clears the internal sync flag and enable writing for |url|.
+ // This method must be called on UI thread.
+ void ClearSyncFlagForURL(const FileSystemURL& url);
// Prepares for sync |url| by disabling writes on |url|.
// If the target |url| is being written and cannot start sync it
@@ -208,7 +214,7 @@ class WEBKIT_STORAGE_EXPORT LocalFileSyncContext
const FileSystemURL& url,
const LocalFileSyncInfoCallback& callback);
- // Helper routine for FinalizeSyncForURL.
+ // Helper routine for ClearSyncFlagForURL.
void EnableWritingOnIOThread(const FileSystemURL& url);
// Callback routine for ApplyRemoteChange.
« no previous file with comments | « chrome/browser/sync_file_system/sync_file_system_service.cc ('k') | webkit/fileapi/syncable/local_file_sync_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698