diff options
author | hashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-31 10:11:20 +0000 |
---|---|---|
committer | hashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-31 10:11:20 +0000 |
commit | 4ec11d3347c3892a599e275d90647d0a52d1610d (patch) | |
tree | 627f43852063b40457bd6bba4bc7f7555e43d85d /google_apis/drive | |
parent | d22eea9622cdad544085bc9f5933a5bc9677fe49 (diff) | |
download | chromium_src-4ec11d3347c3892a599e275d90647d0a52d1610d.zip chromium_src-4ec11d3347c3892a599e275d90647d0a52d1610d.tar.gz chromium_src-4ec11d3347c3892a599e275d90647d0a52d1610d.tar.bz2 |
drive: Stop requesting AboutResource before performing local to drive copy
To make CoypOperation offline capable.
Remove quota check code.
Return GDATA_NO_SPACE from request layer to make it possible to handle quota exceeded error in a different place.
BUG=260539
TEST=unit_tests
Review URL: https://codereview.chromium.org/150633006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248160 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis/drive')
-rw-r--r-- | google_apis/drive/base_requests.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/google_apis/drive/base_requests.cc b/google_apis/drive/base_requests.cc index be64f78..0c1a238 100644 --- a/google_apis/drive/base_requests.cc +++ b/google_apis/drive/base_requests.cc @@ -358,6 +358,7 @@ void UrlFetchRequestBase::OnURLFetchComplete(const URLFetcher* source) { const char kErrorMessageKey[] = "message"; const char kErrorReasonRateLimitExceeded[] = "rateLimitExceeded"; const char kErrorReasonUserRateLimitExceeded[] = "userRateLimitExceeded"; + const char kErrorReasonQuotaExceeded[] = "quotaExceeded"; scoped_ptr<base::Value> value(ParseJsonInternal(response_writer_->data())); base::DictionaryValue* dictionary = NULL; @@ -380,6 +381,8 @@ void UrlFetchRequestBase::OnURLFetchComplete(const URLFetcher* source) { if (reason == kErrorReasonRateLimitExceeded || reason == kErrorReasonUserRateLimitExceeded) error_code_ = HTTP_SERVICE_UNAVAILABLE; + if (reason == kErrorReasonQuotaExceeded) + error_code_ = GDATA_NO_SPACE; } } } |