Upstream version 7.36.149.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
12 #if defined(OS_CHROMEOS)
13 #include "components/signin/core/browser/signin_manager_base.h"
14 #else
15 #include "base/compiler_specific.h"
16 #include "components/signin/core/browser/signin_manager.h"
17 #endif
18
19 class KeyedService;
20 class Profile;
21
22 namespace content {
23 class BrowserContext;
24 }
25
26 namespace gcm {
27
28 #if defined(OS_CHROMEOS)
29 class FakeSigninManager : public SigninManagerBase {
30 #else
31 class FakeSigninManager : public SigninManager {
32 #endif
33  public:
34   explicit FakeSigninManager(Profile* profile);
35   virtual ~FakeSigninManager();
36
37   void SignIn(const std::string& username);
38 #if defined(OS_CHROMEOS)
39   void SignOut();
40 #else
41   virtual void SignOut() OVERRIDE;
42 #endif
43
44   static KeyedService* Build(content::BrowserContext* context);
45
46  private:
47   Profile* profile_;
48
49   DISALLOW_COPY_AND_ASSIGN(FakeSigninManager);
50 };
51
52 }  // namespace gcm
53
54 #endif  // CHROME_BROWSER_SERVICES_GCM_FAKE_SIGNIN_MANAGER_H_