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

Unified Diff: chrome/browser/sync_file_system/local_file_sync_service.cc

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: chrome/browser/sync_file_system/local_file_sync_service.cc
diff --git a/chrome/browser/sync_file_system/local_file_sync_service.cc b/chrome/browser/sync_file_system/local_file_sync_service.cc
index fe02431c71effe4ed2f8fe52b2a919fe7d885b74..baf37d20d9b8f1fca310dae62919c058c3541027 100644
--- a/chrome/browser/sync_file_system/local_file_sync_service.cc
+++ b/chrome/browser/sync_file_system/local_file_sync_service.cc
@@ -148,6 +148,12 @@ void LocalFileSyncService::HasPendingLocalChanges(
origin_to_contexts_[url.origin()], url, callback);
}
+void LocalFileSyncService::ClearSyncFlagForURL(
+ const fileapi::FileSystemURL& url) {
+ DCHECK(ContainsKey(origin_to_contexts_, url.origin()));
+ sync_context_->ClearSyncFlagForURL(url);
+}
+
void LocalFileSyncService::GetLocalFileMetadata(
const fileapi::FileSystemURL& url,
const SyncFileMetadataCallback& callback) {
@@ -217,7 +223,7 @@ void LocalFileSyncService::DidGetFileForLocalSync(
const LocalFileSyncInfo& sync_file_info) {
DCHECK(!local_sync_callback_.is_null());
if (status != fileapi::SYNC_STATUS_OK) {
- RunLocalSyncCallback(status, FileSystemURL());
+ RunLocalSyncCallback(status, sync_file_info.url);
return;
}
if (sync_file_info.changes.empty()) {
@@ -272,7 +278,11 @@ void LocalFileSyncService::ProcessNextChangeForURL(
// OR has failed due to conflict (so that we won't stick to the same
// conflicting file again and again).
DCHECK(ContainsKey(origin_to_contexts_, url.origin()));
- sync_context_->FinalizeSyncForURL(origin_to_contexts_[url.origin()], url);
+ sync_context_->ClearChangesForURL(
+ origin_to_contexts_[url.origin()], url,
+ base::Bind(&LocalFileSyncService::RunLocalSyncCallback,
+ AsWeakPtr(), status, url));
+ return;
}
RunLocalSyncCallback(status, url);
return;

Powered by Google App Engine
This is Rietveld 408576698