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

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

Issue 1094103005: Profile chooser on mac was passing wrong value to signin error controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 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
« 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 if (error.state() != last_auth_error_.state()) { 155 if (error.state() != last_auth_error_.state()) {
156 last_auth_error_ = error; 156 last_auth_error_ = error;
157 signin_error_controller_->AuthStatusChanged(); 157 signin_error_controller_->AuthStatusChanged();
158 } 158 }
159 } 159 }
160 160
161 std::string ProfileOAuth2TokenServiceIOS::AccountInfo::GetAccountId() const { 161 std::string ProfileOAuth2TokenServiceIOS::AccountInfo::GetAccountId() const {
162 return account_id_; 162 return account_id_;
163 } 163 }
164 164
165 std::string ProfileOAuth2TokenServiceIOS::AccountInfo::GetUsername() const {
166 // TODO(rogerta): when |account_id| becomes the obfuscated gaia id, this
167 // will need to be changed.
168 return account_id_;
169 }
170
171 GoogleServiceAuthError 165 GoogleServiceAuthError
172 ProfileOAuth2TokenServiceIOS::AccountInfo::GetAuthStatus() const { 166 ProfileOAuth2TokenServiceIOS::AccountInfo::GetAuthStatus() const {
173 return last_auth_error_; 167 return last_auth_error_;
174 } 168 }
175 169
176 ProfileOAuth2TokenServiceIOS::ProfileOAuth2TokenServiceIOS() 170 ProfileOAuth2TokenServiceIOS::ProfileOAuth2TokenServiceIOS()
177 : ProfileOAuth2TokenService() { 171 : ProfileOAuth2TokenService() {
178 DCHECK(thread_checker_.CalledOnValidThread()); 172 DCHECK(thread_checker_.CalledOnValidThread());
179 } 173 }
180 174
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 client()->GetPrefs()->SetBoolean( 490 client()->GetPrefs()->SetBoolean(
497 prefs::kTokenServiceExcludeAllSecondaryAccounts, true); 491 prefs::kTokenServiceExcludeAllSecondaryAccounts, true);
498 } 492 }
499 493
500 void ProfileOAuth2TokenServiceIOS::ClearExcludedSecondaryAccounts() { 494 void ProfileOAuth2TokenServiceIOS::ClearExcludedSecondaryAccounts() {
501 client()->GetPrefs()->ClearPref( 495 client()->GetPrefs()->ClearPref(
502 prefs::kTokenServiceExcludeAllSecondaryAccounts); 496 prefs::kTokenServiceExcludeAllSecondaryAccounts);
503 client()->GetPrefs()->ClearPref( 497 client()->GetPrefs()->ClearPref(
504 prefs::kTokenServiceExcludedSecondaryAccounts); 498 prefs::kTokenServiceExcludedSecondaryAccounts);
505 } 499 }
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