Add abhijeet.k@samsung.com to AUTHORS list.
[chromium-blink-merge.git] / components / signin / core / browser / fake_auth_status_provider.cc
blob8da1ef4f12ffadbe718060dd01fcccdc8a6fd0c1
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
3 // found in the LICENSE file.
5 #include "components/signin/core/browser/fake_auth_status_provider.h"
7 FakeAuthStatusProvider::FakeAuthStatusProvider(SigninErrorController* error)
8 : error_provider_(error),
9 auth_error_(GoogleServiceAuthError::AuthErrorNone()) {
10 error_provider_->AddProvider(this);
13 FakeAuthStatusProvider::~FakeAuthStatusProvider() {
14 error_provider_->RemoveProvider(this);
17 std::string FakeAuthStatusProvider::GetAccountId() const {
18 return account_id_;
21 std::string FakeAuthStatusProvider::GetUsername() const {
22 return username_;
25 GoogleServiceAuthError FakeAuthStatusProvider::GetAuthStatus() const {
26 return auth_error_;
29 void FakeAuthStatusProvider::SetAuthError(const std::string& account_id,
30 const std::string& username,
31 const GoogleServiceAuthError& error) {
32 account_id_ = account_id;
33 username_ = username;
34 auth_error_ = error;
35 error_provider_->AuthStatusChanged();