| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/signin/fake_auth_status_provider.h" | |
| 6 | |
| 7 FakeAuthStatusProvider::FakeAuthStatusProvider(SigninErrorController* error) | |
| 8 : error_provider_(error), | |
| 9 auth_error_(GoogleServiceAuthError::AuthErrorNone()) { | |
| 10 error_provider_->AddProvider(this); | |
| 11 } | |
| 12 | |
| 13 FakeAuthStatusProvider::~FakeAuthStatusProvider() { | |
| 14 error_provider_->RemoveProvider(this); | |
| 15 } | |
| 16 | |
| 17 std::string FakeAuthStatusProvider::GetAccountId() const { | |
| 18 return account_id_; | |
| 19 } | |
| 20 | |
| 21 GoogleServiceAuthError FakeAuthStatusProvider::GetAuthStatus() const { | |
| 22 return auth_error_; | |
| 23 } | |
| 24 | |
| 25 void FakeAuthStatusProvider::SetAuthError(const std::string& account_id, | |
| 26 const GoogleServiceAuthError& error) { | |
| 27 account_id_ = account_id; | |
| 28 auth_error_ = error; | |
| 29 error_provider_->AuthStatusChanged(); | |
| 30 } | |
| OLD | NEW |