1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_SERVICES_GCM_FAKE_SIGNIN_MANAGER_H_
6#define CHROME_BROWSER_SERVICES_GCM_FAKE_SIGNIN_MANAGER_H_
7
8#include <string>
9
10#include "base/macros.h"
11#include "components/signin/core/browser/signin_metrics.h"
12
13#if defined(OS_CHROMEOS)
14#include "components/signin/core/browser/signin_manager_base.h"
15#else
16#include "base/compiler_specific.h"
17#include "components/signin/core/browser/signin_manager.h"
18#endif
19
20class KeyedService;
21class Profile;
22
23namespace content {
24class BrowserContext;
25}
26
27namespace gcm {
28
29#if defined(OS_CHROMEOS)
30class FakeSigninManager : public SigninManagerBase {
31#else
32class FakeSigninManager : public SigninManager {
33#endif
34 public:
35  explicit FakeSigninManager(Profile* profile);
36  virtual ~FakeSigninManager();
37
38  void SignIn(const std::string& username);
39#if defined(OS_CHROMEOS)
40  void SignOut(signin_metrics::ProfileSignout signout_source_metric);
41#else
42  virtual void SignOut(signin_metrics::ProfileSignout signout_source_metric)
43      OVERRIDE;
44#endif
45
46  static KeyedService* Build(content::BrowserContext* context);
47
48 private:
49  Profile* profile_;
50
51  DISALLOW_COPY_AND_ASSIGN(FakeSigninManager);
52};
53
54}  // namespace gcm
55
56#endif  // CHROME_BROWSER_SERVICES_GCM_FAKE_SIGNIN_MANAGER_H_
57