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

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

Issue 12916010: SyncFS: -1 GDataErrorCode should be handled gracefully (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 months 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_util.cc
diff --git a/chrome/browser/sync_file_system/drive_file_sync_util.cc b/chrome/browser/sync_file_system/drive_file_sync_util.cc
index 333de0d9342f094629e53df3431762d6c6031c23..76de67437261348ac50c722ffc05957dfd7f9d95 100644
--- a/chrome/browser/sync_file_system/drive_file_sync_util.cc
+++ b/chrome/browser/sync_file_system/drive_file_sync_util.cc
@@ -56,7 +56,15 @@ SyncStatusCode GDataErrorCodeToSyncStatusCode(
case google_apis::GDATA_NO_SPACE:
return SYNC_FILE_ERROR_NO_SPACE;
}
- NOTREACHED();
+
+ // There's a case where DriveService layer returns GDataErrorCode==-1
+ // when network is unavailable. (http://crbug.com/223042)
+ // TODO(kinuko,nhiroki): We should identify from where this undefined error
+ // code is coming.
+ if (error == -1)
+ return SYNC_STATUS_NETWORK_ERROR;
+
+ LOG(WARNING) << "Got unexpected error: " << error;
return SYNC_STATUS_FAILED;
}
« 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