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

Unified Diff: google_apis/drive/base_requests.cc

Issue 1218773003: Implement a DRIVE_REQUEST_TOO_LARGE backoff. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 6 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
Index: google_apis/drive/base_requests.cc
diff --git a/google_apis/drive/base_requests.cc b/google_apis/drive/base_requests.cc
index 604324491df920cacca74f339eb48cb153594a67..e526012eeccc41ccbb1735c1a18e41ee01dd7931 100644
--- a/google_apis/drive/base_requests.cc
+++ b/google_apis/drive/base_requests.cc
@@ -152,6 +152,7 @@ google_apis::DriveApiErrorCode MapJsonError(
const char kErrorReasonRateLimitExceeded[] = "rateLimitExceeded";
const char kErrorReasonUserRateLimitExceeded[] = "userRateLimitExceeded";
const char kErrorReasonQuotaExceeded[] = "quotaExceeded";
+ const char kErrorReasonResponseTooLarge[] = "responseTooLarge";
scoped_ptr<const base::Value> value(google_apis::ParseJson(error_body));
const base::DictionaryValue* dictionary = NULL;
@@ -177,6 +178,8 @@ google_apis::DriveApiErrorCode MapJsonError(
}
if (reason == kErrorReasonQuotaExceeded)
return google_apis::DRIVE_NO_SPACE;
+ if (reason == kErrorReasonResponseTooLarge)
+ return google_apis::DRIVE_RESPONSE_TOO_LARGE;
}
}

Powered by Google App Engine
This is Rietveld 408576698