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

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

Issue 1257623002: Componentize FakeSigninManager and SigninManager prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 5 years, 5 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
« no previous file with comments | « chrome/browser/signin/fake_signin_manager.cc ('k') | chrome/browser/signin/fake_signin_manager_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/fake_signin_manager_builder.h
diff --git a/chrome/browser/chromeos/login/screens/mock_base_screen_delegate.h b/chrome/browser/signin/fake_signin_manager_builder.h
similarity index 22%
copy from chrome/browser/chromeos/login/screens/mock_base_screen_delegate.h
copy to chrome/browser/signin/fake_signin_manager_builder.h
index 2d2c01c46ac203db22f84a217e1fb82c4ca157ed..0896bedf0703947b67b7e91557d9766d33873450 100644
--- a/chrome/browser/chromeos/login/screens/mock_base_screen_delegate.h
+++ b/chrome/browser/signin/fake_signin_manager_builder.h
@@ -2,32 +2,38 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_MOCK_BASE_SCREEN_DELEGATE_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_MOCK_BASE_SCREEN_DELEGATE_H_
+#ifndef CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_BUILDER_H_
+#define CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_BUILDER_H_
#include <string>
-#include "chrome/browser/chromeos/login/screens/base_screen.h"
-#include "chrome/browser/chromeos/login/screens/base_screen_delegate.h"
-#include "testing/gmock/include/gmock/gmock.h"
+#include "base/memory/scoped_ptr.h"
-namespace chromeos {
+#include "components/signin/core/browser/fake_signin_manager.h"
+
+namespace content {
+class BrowserContext;
+}
+
+class KeyedService;
+class Profile;
+
+// Helper function to be used with KeyedService::SetTestingFactory().
+// In order to match the API of SigninManagerFactory::GetForProfile(), returns a
+// FakeSigninManagerBase* on ChromeOS, and a FakeSigninManager* on all other
+// platforms. The returned instance is initialized.
+scoped_ptr<KeyedService> BuildFakeSigninManagerBase(
+ content::BrowserContext* context);
+
+class FakeSigninManagerForTesting
+#if defined(OS_CHROMEOS)
+ : public FakeSigninManagerBase {
+#else
+ : public FakeSigninManager {
+#endif
-// Interface that handles notifications received from any of login wizard
-// screens.
-class MockBaseScreenDelegate : public BaseScreenDelegate {
public:
- MockBaseScreenDelegate();
- virtual ~MockBaseScreenDelegate();
-
- MOCK_METHOD3(OnExit,
- void(BaseScreen&, ExitCodes, const ::login::ScreenContext*));
- MOCK_METHOD0(ShowCurrentScreen, void());
- MOCK_METHOD0(GetErrorScreen, ErrorScreen*());
- MOCK_METHOD0(ShowErrorScreen, void());
- MOCK_METHOD1(HideErrorScreen, void(BaseScreen*));
+ FakeSigninManagerForTesting(Profile* profile);
};
-} // namespace chromeos
-
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_MOCK_BASE_SCREEN_DELEGATE_H_
+#endif // CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_BUILDER_H_
« no previous file with comments | « chrome/browser/signin/fake_signin_manager.cc ('k') | chrome/browser/signin/fake_signin_manager_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698