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

Side by Side Diff: chrome/browser/signin/signin_ui_util.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/signin/signin_ui_util.h" 5 #include "chrome/browser/signin/signin_ui_util.h"
6 6
7 #include "base/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/signin/signin_global_error.h" 10 #include "chrome/browser/signin/signin_global_error.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 string16* link_label) { 94 string16* link_label) {
95 string16 username = UTF8ToUTF16(signin_manager.GetAuthenticatedUsername()); 95 string16 username = UTF8ToUTF16(signin_manager.GetAuthenticatedUsername());
96 string16 product_name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); 96 string16 product_name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
97 if (link_label) 97 if (link_label)
98 link_label->assign(l10n_util::GetStringUTF16(IDS_SYNC_RELOGIN_LINK_LABEL)); 98 link_label->assign(l10n_util::GetStringUTF16(IDS_SYNC_RELOGIN_LINK_LABEL));
99 99
100 const GoogleServiceAuthError::State state = 100 const GoogleServiceAuthError::State state =
101 SigninGlobalError::GetForProfile(profile)->GetLastAuthError().state(); 101 SigninGlobalError::GetForProfile(profile)->GetLastAuthError().state();
102 switch (state) { 102 switch (state) {
103 case GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS: 103 case GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS:
104 case GoogleServiceAuthError::SERVICE_ERROR:
104 case GoogleServiceAuthError::ACCOUNT_DELETED: 105 case GoogleServiceAuthError::ACCOUNT_DELETED:
105 case GoogleServiceAuthError::ACCOUNT_DISABLED: 106 case GoogleServiceAuthError::ACCOUNT_DISABLED:
106 // If the user name is empty then the first login failed, otherwise the 107 // If the user name is empty then the first login failed, otherwise the
107 // credentials are out-of-date. 108 // credentials are out-of-date.
108 if (username.empty()) { 109 if (username.empty()) {
109 if (status_label) { 110 if (status_label) {
110 status_label->assign( 111 status_label->assign(
111 l10n_util::GetStringUTF16(IDS_SYNC_INVALID_USER_CREDENTIALS)); 112 l10n_util::GetStringUTF16(IDS_SYNC_INVALID_USER_CREDENTIALS));
112 } 113 }
113 } else { 114 } else {
(...skipping 26 matching lines...) Expand all
140 default: 141 default:
141 if (status_label) { 142 if (status_label) {
142 status_label->assign(l10n_util::GetStringUTF16( 143 status_label->assign(l10n_util::GetStringUTF16(
143 IDS_SYNC_ERROR_SIGNING_IN)); 144 IDS_SYNC_ERROR_SIGNING_IN));
144 } 145 }
145 break; 146 break;
146 } 147 }
147 } 148 }
148 149
149 } // namespace signin_ui_util 150 } // namespace signin_ui_util
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_global_error.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698