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

Side by Side Diff: chrome/browser/extensions/api/identity/identity_api.cc

Issue 57993006: signin: record http response codes and net errors in OAuth2AccessTokenFetcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: eof Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/identity/identity_api.h" 5 #include "chrome/browser/extensions/api/identity/identity_api.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 CompleteMintTokenFlow(); 276 CompleteMintTokenFlow();
277 CompleteFunctionWithResult(access_token); 277 CompleteFunctionWithResult(access_token);
278 } 278 }
279 279
280 void IdentityGetAuthTokenFunction::OnMintTokenFailure( 280 void IdentityGetAuthTokenFunction::OnMintTokenFailure(
281 const GoogleServiceAuthError& error) { 281 const GoogleServiceAuthError& error) {
282 CompleteMintTokenFlow(); 282 CompleteMintTokenFlow();
283 283
284 switch (error.state()) { 284 switch (error.state()) {
285 case GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS: 285 case GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS:
286 case GoogleServiceAuthError::SERVICE_ERROR:
286 case GoogleServiceAuthError::ACCOUNT_DELETED: 287 case GoogleServiceAuthError::ACCOUNT_DELETED:
287 case GoogleServiceAuthError::ACCOUNT_DISABLED: 288 case GoogleServiceAuthError::ACCOUNT_DISABLED:
288 extensions::IdentityAPI::GetFactoryInstance() 289 extensions::IdentityAPI::GetFactoryInstance()
289 ->GetForProfile(GetProfile()) 290 ->GetForProfile(GetProfile())
290 ->ReportAuthError(error); 291 ->ReportAuthError(error);
291 if (should_prompt_for_signin_) { 292 if (should_prompt_for_signin_) {
292 // Display a login prompt and try again (once). 293 // Display a login prompt and try again (once).
293 StartSigninFlow(); 294 StartSigninFlow();
294 return; 295 return;
295 } 296 }
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 const IdentityAPI::TokenCacheKey& rhs) const { 778 const IdentityAPI::TokenCacheKey& rhs) const {
778 if (extension_id < rhs.extension_id) 779 if (extension_id < rhs.extension_id)
779 return true; 780 return true;
780 else if (rhs.extension_id < extension_id) 781 else if (rhs.extension_id < extension_id)
781 return false; 782 return false;
782 783
783 return scopes < rhs.scopes; 784 return scopes < rhs.scopes;
784 } 785 }
785 786
786 } // namespace extensions 787 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698