Commit 932b8504 authored by kinuko@chromium.org's avatar kinuko@chromium.org

SyncFS: -1 GDataErrorCode should be handled gracefully

GData service code seems to occasionally return -1 when network is
unavailable.

BUG=223042
TEST=manual
NOTRY=true


Review URL: https://chromiumcodereview.appspot.com/12916010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190536 0039d316-1c4b-4281-b951-d872f2087c98
parent 59955827
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment