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

Unified Diff: chrome/browser/signin/fake_auth_status_provider.h

Issue 12077030: Allow signin to continue even if sync is disabled by policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed mac tests. Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/signin/fake_auth_status_provider.h
diff --git a/chrome/browser/signin/fake_auth_status_provider.h b/chrome/browser/signin/fake_auth_status_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..21b617351532a32b78bd75ba4b52f24f9a3f26f0
--- /dev/null
+++ b/chrome/browser/signin/fake_auth_status_provider.h
@@ -0,0 +1,30 @@
+// 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.
+
+#ifndef CHROME_BROWSER_SIGNIN_FAKE_AUTH_STATUS_PROVIDER_H_
+#define CHROME_BROWSER_SIGNIN_FAKE_AUTH_STATUS_PROVIDER_H_
+
+#include "chrome/browser/signin/signin_global_error.h"
+
+// Helper class that reports auth errors to SigninGlobalError. Automatically
+// registers and de-registers itself as an AuthStatusProvider in the
+// constructor and destructor.
+class FakeAuthStatusProvider : public SigninGlobalError::AuthStatusProvider {
+ public:
+ FakeAuthStatusProvider(SigninGlobalError* error);
+ virtual ~FakeAuthStatusProvider();
+
+ // Sets the auth error that this provider reports to SigninGlobalError. Also
+ // notifies SigninGlobalError via AuthStatusChanged().
+ void set_auth_error(const GoogleServiceAuthError& error);
+
+ // AuthStatusProvider implementation.
+ virtual GoogleServiceAuthError GetAuthStatus() const OVERRIDE;
+
+ private:
+ SigninGlobalError* global_error_;
+ GoogleServiceAuthError auth_error_;
+};
+
+#endif // CHROME_BROWSER_SIGNIN_FAKE_AUTH_STATUS_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698