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

Side by Side Diff: components/signin/ios/browser/profile_oauth2_token_service_ios.mm

Issue 288813003: Add username of account that has an auth error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « components/signin/ios/browser/profile_oauth2_token_service_ios.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/signin/ios/browser/profile_oauth2_token_service_ios.h" 5 #include "components/signin/ios/browser/profile_oauth2_token_service_ios.h"
6 6
7 #include <Foundation/Foundation.h> 7 #include <Foundation/Foundation.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 if (error.state() != last_auth_error_.state()) { 201 if (error.state() != last_auth_error_.state()) {
202 last_auth_error_ = error; 202 last_auth_error_ = error;
203 token_service_->signin_error_controller()->AuthStatusChanged(); 203 token_service_->signin_error_controller()->AuthStatusChanged();
204 } 204 }
205 } 205 }
206 206
207 std::string ProfileOAuth2TokenServiceIOS::AccountInfo::GetAccountId() const { 207 std::string ProfileOAuth2TokenServiceIOS::AccountInfo::GetAccountId() const {
208 return account_id_; 208 return account_id_;
209 } 209 }
210 210
211 std::string ProfileOAuth2TokenServiceIOS::AccountInfo::GetUsername() const {
212 // TODO(rogerta): when |account_id| becomes the obfuscated gaia id, this
213 // will need to be changed.
214 return account_id_;
215 }
216
211 GoogleServiceAuthError 217 GoogleServiceAuthError
212 ProfileOAuth2TokenServiceIOS::AccountInfo::GetAuthStatus() const { 218 ProfileOAuth2TokenServiceIOS::AccountInfo::GetAuthStatus() const {
213 return last_auth_error_; 219 return last_auth_error_;
214 } 220 }
215 221
216 ProfileOAuth2TokenServiceIOS::ProfileOAuth2TokenServiceIOS() 222 ProfileOAuth2TokenServiceIOS::ProfileOAuth2TokenServiceIOS()
217 : MutableProfileOAuth2TokenService(), 223 : MutableProfileOAuth2TokenService(),
218 use_legacy_token_service_(false) { 224 use_legacy_token_service_(false) {
219 DCHECK(thread_checker_.CalledOnValidThread()); 225 DCHECK(thread_checker_.CalledOnValidThread());
220 } 226 }
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 if (!use_legacy_token_service_) 497 if (!use_legacy_token_service_)
492 return; 498 return;
493 MutableProfileOAuth2TokenService::RevokeAllCredentials(); 499 MutableProfileOAuth2TokenService::RevokeAllCredentials();
494 use_legacy_token_service_ = false; 500 use_legacy_token_service_ = false;
495 } 501 }
496 502
497 void ProfileOAuth2TokenServiceIOS::SetUseLegacyTokenServiceForTesting( 503 void ProfileOAuth2TokenServiceIOS::SetUseLegacyTokenServiceForTesting(
498 bool use_legacy_token_service) { 504 bool use_legacy_token_service) {
499 use_legacy_token_service_ = use_legacy_token_service; 505 use_legacy_token_service_ = use_legacy_token_service;
500 } 506 }
OLDNEW
« no previous file with comments | « components/signin/ios/browser/profile_oauth2_token_service_ios.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698