Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ |
| 6 #define CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ | 6 #define CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 10 #include "components/keyed_service/core/keyed_service.h" | 11 #include "components/keyed_service/core/keyed_service.h" |
| 11 #include "components/signin/core/signin_client.h" | 12 #include "components/signin/core/signin_client.h" |
| 12 | 13 |
| 13 class CookieSettings; | 14 class CookieSettings; |
| 14 class Profile; | 15 class Profile; |
| 16 class SigninAccountIdHelper; | |
| 15 | 17 |
| 16 class ChromeSigninClient : public SigninClient, public KeyedService { | 18 class ChromeSigninClient : public SigninClient, public KeyedService { |
| 17 public: | 19 public: |
| 18 explicit ChromeSigninClient(Profile* profile); | 20 explicit ChromeSigninClient(Profile* profile); |
| 19 virtual ~ChromeSigninClient(); | 21 virtual ~ChromeSigninClient(); |
| 20 | 22 |
| 21 // Utility methods. | 23 // Utility methods. |
| 22 static bool ProfileAllowsSigninCookies(Profile* profile); | 24 static bool ProfileAllowsSigninCookies(Profile* profile); |
| 23 static bool SettingsAllowSigninCookies(CookieSettings* cookie_settings); | 25 static bool SettingsAllowSigninCookies(CookieSettings* cookie_settings); |
| 24 | 26 |
| 25 // SigninClient implementation. | 27 // SigninClient implementation. |
| 26 virtual scoped_refptr<TokenWebData> GetDatabase() OVERRIDE; | 28 virtual scoped_refptr<TokenWebData> GetDatabase() OVERRIDE; |
| 27 virtual bool CanRevokeCredentials() OVERRIDE; | 29 virtual bool CanRevokeCredentials() OVERRIDE; |
| 28 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE; | 30 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE; |
| 31 virtual void GoogleSigninSucceeded(const std::string& username, | |
| 32 const std::string& password) OVERRIDE; | |
| 33 | |
| 34 #if !defined(OS_CHROMEOS) | |
|
blundell
2014/03/21 15:01:46
I decided to make this API non-ChromeOS to make it
| |
| 35 virtual void SigninManagerInitialized(SigninManager* manager) OVERRIDE; | |
| 36 virtual void SigninManagerShutdown(SigninManager* manager) OVERRIDE; | |
| 37 #endif | |
| 29 | 38 |
| 30 private: | 39 private: |
| 31 Profile* profile_; | 40 Profile* profile_; |
| 32 | 41 |
| 42 // Fetcher for the obfuscated user id. | |
| 43 scoped_ptr<SigninAccountIdHelper> account_id_helper_; | |
| 44 | |
| 33 DISALLOW_COPY_AND_ASSIGN(ChromeSigninClient); | 45 DISALLOW_COPY_AND_ASSIGN(ChromeSigninClient); |
| 34 }; | 46 }; |
| 35 | 47 |
| 36 #endif // CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ | 48 #endif // CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ |
| OLD | NEW |