Adding instrumentation to locate the source of jankiness
[chromium-blink-merge.git] / chrome / browser / services / gcm / fake_signin_manager.h
blob451b497dd7382df350907c6f201316271cedae16
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.
5 #ifndef CHROME_BROWSER_SERVICES_GCM_FAKE_SIGNIN_MANAGER_H_
6 #define CHROME_BROWSER_SERVICES_GCM_FAKE_SIGNIN_MANAGER_H_
8 #include <string>
10 #include "base/macros.h"
11 #include "components/signin/core/browser/signin_metrics.h"
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
20 class KeyedService;
21 class Profile;
23 namespace content {
24 class BrowserContext;
27 namespace gcm {
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 virtual ~FakeSigninManager();
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
46 static KeyedService* Build(content::BrowserContext* context);
48 private:
49 Profile* profile_;
51 DISALLOW_COPY_AND_ASSIGN(FakeSigninManager);
54 } // namespace gcm
56 #endif // CHROME_BROWSER_SERVICES_GCM_FAKE_SIGNIN_MANAGER_H_