Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / services / gcm / fake_signin_manager.h
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
20 class KeyedService;
21 class Profile;
22
23 namespace content {
24 class BrowserContext;
25 }
26
27 namespace gcm {
28
29 #if defined(OS_CHROMEOS)
30 class FakeSigninManager : public SigninManagerBase {
31 #else
32 class FakeSigninManager : public SigninManager {
33 #endif
34  public:
35   explicit FakeSigninManager(Profile* profile);
36   ~FakeSigninManager() override;
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   void SignOut(signin_metrics::ProfileSignout signout_source_metric) override;
43 #endif
44
45   static KeyedService* Build(content::BrowserContext* context);
46
47  private:
48   Profile* profile_;
49
50   DISALLOW_COPY_AND_ASSIGN(FakeSigninManager);
51 };
52
53 }  // namespace gcm
54
55 #endif  // CHROME_BROWSER_SERVICES_GCM_FAKE_SIGNIN_MANAGER_H_