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

Side by Side Diff: components/signin/core/browser/fake_auth_status_provider.cc

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
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/core/browser/fake_auth_status_provider.h" 5 #include "components/signin/core/browser/fake_auth_status_provider.h"
6 6
7 FakeAuthStatusProvider::FakeAuthStatusProvider(SigninErrorController* error) 7 FakeAuthStatusProvider::FakeAuthStatusProvider(SigninErrorController* error)
8 : error_provider_(error), 8 : error_provider_(error),
9 auth_error_(GoogleServiceAuthError::AuthErrorNone()) { 9 auth_error_(GoogleServiceAuthError::AuthErrorNone()) {
10 error_provider_->AddProvider(this); 10 error_provider_->AddProvider(this);
11 } 11 }
12 12
13 FakeAuthStatusProvider::~FakeAuthStatusProvider() { 13 FakeAuthStatusProvider::~FakeAuthStatusProvider() {
14 error_provider_->RemoveProvider(this); 14 error_provider_->RemoveProvider(this);
15 } 15 }
16 16
17 std::string FakeAuthStatusProvider::GetAccountId() const { 17 std::string FakeAuthStatusProvider::GetAccountId() const {
18 return account_id_; 18 return account_id_;
19 } 19 }
20 20
21 std::string FakeAuthStatusProvider::GetUsername() const {
22 return username_;
23 }
24
25 GoogleServiceAuthError FakeAuthStatusProvider::GetAuthStatus() const { 21 GoogleServiceAuthError FakeAuthStatusProvider::GetAuthStatus() const {
26 return auth_error_; 22 return auth_error_;
27 } 23 }
28 24
29 void FakeAuthStatusProvider::SetAuthError(const std::string& account_id, 25 void FakeAuthStatusProvider::SetAuthError(const std::string& account_id,
30 const std::string& username,
31 const GoogleServiceAuthError& error) { 26 const GoogleServiceAuthError& error) {
32 account_id_ = account_id; 27 account_id_ = account_id;
33 username_ = username;
34 auth_error_ = error; 28 auth_error_ = error;
35 error_provider_->AuthStatusChanged(); 29 error_provider_->AuthStatusChanged();
36 } 30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698