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

Unified Diff: cloud_print/gcp20/prototype/cloud_print_requester.cc

Issue 22184007: GCP2.0 Device: Instant AccessToken update on AuthFailed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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 | « cloud_print/gcp20/prototype/cloud_print_requester.h ('k') | cloud_print/gcp20/prototype/printer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cloud_print/gcp20/prototype/cloud_print_requester.cc
diff --git a/cloud_print/gcp20/prototype/cloud_print_requester.cc b/cloud_print/gcp20/prototype/cloud_print_requester.cc
index 1154d62b38f5b867fad08e725c8bd4008a2e3807..1910b7f267a8d223b1ae8d861206b69905383bbd 100644
--- a/cloud_print/gcp20/prototype/cloud_print_requester.cc
+++ b/cloud_print/gcp20/prototype/cloud_print_requester.cc
@@ -168,10 +168,15 @@ void CloudPrintRequester::OnFetchError(const std::string& server_api,
VLOG(3) << "Function: " << __FUNCTION__;
EraseRequest();
current_print_job_.reset();
- delegate_->OnServerError("Fetch error");
- // TODO(maksymb): |server_api| and other
- NOTIMPLEMENTED();
+ if (server_http_code == net::HTTP_FORBIDDEN) {
+ delegate_->OnAuthError();
+ } else {
+ delegate_->OnServerError("Fetch error");
+ }
+
+ // TODO(maksymb): Add Privet |server_http_code| and |server_api| support in
+ // case of server errors.
}
void CloudPrintRequester::OnFetchTimeoutReached() {
@@ -186,8 +191,8 @@ void CloudPrintRequester::OnGetTokensResponse(const std::string& refresh_token,
int expires_in_seconds) {
VLOG(3) << "Function: " << __FUNCTION__;
gaia_.reset();
- delegate_->OnGetAuthCodeResponseParsed(refresh_token,
- access_token, expires_in_seconds);
+ delegate_->OnRegistrationFinished(refresh_token,
+ access_token, expires_in_seconds);
}
void CloudPrintRequester::OnRefreshTokenResponse(
« no previous file with comments | « cloud_print/gcp20/prototype/cloud_print_requester.h ('k') | cloud_print/gcp20/prototype/printer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698