| 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_
|
|
|