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

Unified Diff: chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc

Issue 101223003: SyncFS: Handle HTTP_CONFLICT as Precondition error (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « chrome/browser/sync_file_system/drive_backend/conflict_resolver.cc ('k') | 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_backend/local_to_remote_syncer.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc b/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc
index c967919f021ec791b05260736af5c1fd35361a3f..d7a0b04696e0056afc3c099d32cb8b63dc84b03d 100644
--- a/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc
+++ b/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc
@@ -335,15 +335,16 @@ void LocalToRemoteSyncer::DidDeleteRemoteFile(
google_apis::GDataErrorCode error) {
if (error != google_apis::HTTP_SUCCESS &&
error != google_apis::HTTP_NOT_FOUND &&
- error != google_apis::HTTP_PRECONDITION) {
+ error != google_apis::HTTP_PRECONDITION &&
+ error != google_apis::HTTP_CONFLICT) {
callback.Run(GDataErrorCodeToSyncStatusCode(error));
return;
}
// Handle NOT_FOUND case as SUCCESS case.
- // For PRECONDITION case, the remote file is modified since the last sync
- // completed. As our policy for deletion-modification conflict resolution,
- // ignore the local deletion.
+ // For PRECONDITION / CONFLICT case, the remote file is modified since the
+ // last sync completed. As our policy for deletion-modification conflict
+ // resolution, ignore the local deletion.
callback.Run(SYNC_STATUS_OK);
}
@@ -386,7 +387,8 @@ void LocalToRemoteSyncer::DidUploadExistingFile(
google_apis::GDataErrorCode error,
const GURL&,
scoped_ptr<google_apis::ResourceEntry> entry) {
- if (error == google_apis::HTTP_PRECONDITION) {
+ if (error == google_apis::HTTP_PRECONDITION ||
+ error == google_apis::HTTP_CONFLICT) {
// The remote file has unfetched remote change. Fetch latest metadata and
// update database with it.
// TODO(tzik): Consider adding local side low-priority dirtiness handling to
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/conflict_resolver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698