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

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

Issue 11418305: Fix incremental sync behavior of DriveFileSyncService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_file_sync_service.cc
diff --git a/chrome/browser/sync_file_system/drive_file_sync_service.cc b/chrome/browser/sync_file_system/drive_file_sync_service.cc
index e0edc101ece985f4c1455178f2fed993ed1668c3..2ada209fb1862a11f447b49c831d8df1ce6158f9 100644
--- a/chrome/browser/sync_file_system/drive_file_sync_service.cc
+++ b/chrome/browser/sync_file_system/drive_file_sync_service.cc
@@ -1083,7 +1083,10 @@ void DriveFileSyncService::DidPrepareForProcessRemoteChange(
DCHECK(param->remote_change.change.IsDelete());
param->operation_type = fileapi::SYNC_OPERATION_NONE;
- DeleteMetadataForRemoteSync(param.Pass());
+ if (missing_db_entry)
+ CompleteRemoteSync(param.Pass(), fileapi::SYNC_STATUS_OK);
kinuko 2012/12/04 08:55:42 Could this happen? (We're in metadata.conflicted()
tzik 2012/12/04 09:14:29 Done. It can't be reached.
+ else
+ DeleteMetadataForRemoteSync(param.Pass());
return;
}
@@ -1142,7 +1145,10 @@ void DriveFileSyncService::DidPrepareForProcessRemoteChange(
if (local_changes.empty()) {
if (missing_local_file) {
param->operation_type = fileapi::SYNC_OPERATION_NONE;
- DeleteMetadataForRemoteSync(param.Pass());
+ if (missing_db_entry)
+ CompleteRemoteSync(param.Pass(), fileapi::SYNC_STATUS_OK);
+ else
+ DeleteMetadataForRemoteSync(param.Pass());
return;
}
DCHECK(!missing_local_file);
@@ -1165,7 +1171,10 @@ void DriveFileSyncService::DidPrepareForProcessRemoteChange(
DCHECK(local_changes.list().back().IsDelete());
param->operation_type = fileapi::SYNC_OPERATION_NONE;
- DeleteMetadataForRemoteSync(param.Pass());
+ if (missing_db_entry)
+ CompleteRemoteSync(param.Pass(), fileapi::SYNC_STATUS_OK);
+ else
+ DeleteMetadataForRemoteSync(param.Pass());
}
void DriveFileSyncService::DownloadForRemoteSync(
@@ -1403,7 +1412,7 @@ void DriveFileSyncService::FetchChangesForIncrementalSync() {
}
sync_client_->ListChanges(
- largest_fetched_changestamp_,
+ largest_fetched_changestamp_ + 1,
base::Bind(&DriveFileSyncService::DidFetchChangesForIncrementalSync,
AsWeakPtr(), base::Passed(&token)));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698