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

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: Fix windows sync integration test failure 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..9d937d5311233f18b6204740c7049589a97d4630
--- /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:
+ explicit FakeAuthStatusProvider(SigninGlobalError* error);
+ virtual ~FakeAuthStatusProvider();
+
+ // Sets the auth error that this provider reports to SigninGlobalError. Also
+ // notifies SigninGlobalError via AuthStatusChanged().
+ void SetAuthError(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_
« no previous file with comments | « chrome/browser/resources/options/sync_section.html ('k') | chrome/browser/signin/fake_auth_status_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698