Index: chrome/browser/signin/fake_auth_status_provider.cc |
diff --git a/chrome/browser/signin/fake_auth_status_provider.cc b/chrome/browser/signin/fake_auth_status_provider.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..de33023711e3400e00aabb8f6f56f17db1fdd117 |
--- /dev/null |
+++ b/chrome/browser/signin/fake_auth_status_provider.cc |
@@ -0,0 +1,24 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "chrome/browser/signin/fake_auth_status_provider.h" |
+ |
+FakeAuthStatusProvider::FakeAuthStatusProvider(SigninGlobalError* error) |
+ : global_error_(error), |
+ auth_error_(GoogleServiceAuthError::None()) { |
+ global_error_->AddProvider(this); |
+} |
+ |
+FakeAuthStatusProvider::~FakeAuthStatusProvider() { |
+ global_error_->RemoveProvider(this); |
+} |
+ |
+GoogleServiceAuthError FakeAuthStatusProvider::GetAuthStatus() const { |
+ return auth_error_; |
+} |
+ |
+void FakeAuthStatusProvider::SetAuthError(const GoogleServiceAuthError& error) { |
+ auth_error_ = error; |
+ global_error_->AuthStatusChanged(); |
+} |