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

Unified Diff: chrome/browser/sync_file_system/sync_file_system_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/sync_file_system_service.cc
diff --git a/chrome/browser/sync_file_system/sync_file_system_service.cc b/chrome/browser/sync_file_system/sync_file_system_service.cc
index 564e595a447291d9bb69f60f91cf093aaed7e05a..96344478c01c481422997e4f62e686d5d59b34a6 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service.cc
+++ b/chrome/browser/sync_file_system/sync_file_system_service.cc
@@ -382,6 +382,13 @@ void SyncFileSystemService::DidProcessRemoteChange(
<< " operation_type=" << type;
DCHECK(remote_sync_running_);
remote_sync_running_ = false;
+
+ if (status != fileapi::SYNC_STATUS_NO_CHANGE_TO_SYNC &&
+ remote_file_service_->GetCurrentState() != REMOTE_SERVICE_DISABLED) {
+ DCHECK(url.is_valid());
+ local_file_service_->ClearSyncFlagForURL(url);
+ }
+
if (status == fileapi::SYNC_STATUS_OK &&
type != fileapi::SYNC_OPERATION_NONE) {
// Notify observers of the changes made for a remote sync.
@@ -411,6 +418,12 @@ void SyncFileSystemService::DidProcessLocalChange(
<< " url=" << url.DebugString();
DCHECK(local_sync_running_);
local_sync_running_ = false;
+
+ if (status != fileapi::SYNC_STATUS_NO_CHANGE_TO_SYNC) {
+ DCHECK(url.is_valid());
+ local_file_service_->ClearSyncFlagForURL(url);
+ }
+
if (status == fileapi::SYNC_STATUS_NO_CHANGE_TO_SYNC) {
// We seem to have no changes to work on for now.
// TODO(kinuko): Might be better setting a timer to call MaybeStartSync.
« no previous file with comments | « chrome/browser/sync_file_system/local_file_sync_service_unittest.cc ('k') | webkit/fileapi/syncable/local_file_sync_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698