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