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 "components/keyed_service/core/keyed_service.h" | 10 #include "components/keyed_service/core/keyed_service.h" |
11 #include "components/signin/core/browser/signin_client.h" | 11 #include "components/signin/core/browser/signin_client.h" |
12 | 12 |
13 class CookieSettings; | 13 class CookieSettings; |
14 class Profile; | 14 class Profile; |
15 | 15 |
16 class ChromeSigninClient : public SigninClient, public KeyedService { | 16 class ChromeSigninClient : public SigninClient, public KeyedService { |
17 public: | 17 public: |
18 explicit ChromeSigninClient(Profile* profile); | 18 explicit ChromeSigninClient(Profile* profile); |
19 virtual ~ChromeSigninClient(); | 19 virtual ~ChromeSigninClient(); |
20 | 20 |
21 // Utility methods. | 21 // Utility methods. |
22 static bool ProfileAllowsSigninCookies(Profile* profile); | 22 static bool ProfileAllowsSigninCookies(Profile* profile); |
23 static bool SettingsAllowSigninCookies(CookieSettings* cookie_settings); | 23 static bool SettingsAllowSigninCookies(CookieSettings* cookie_settings); |
24 | 24 |
25 // SigninClient implementation. | 25 // SigninClient implementation. |
26 virtual PrefService* GetPrefs() OVERRIDE; | 26 virtual PrefService* GetPrefs() OVERRIDE; |
27 virtual scoped_refptr<TokenWebData> GetDatabase() OVERRIDE; | 27 virtual scoped_refptr<TokenWebData> GetDatabase() OVERRIDE; |
28 virtual bool CanRevokeCredentials() OVERRIDE; | 28 virtual bool CanRevokeCredentials() OVERRIDE; |
29 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE; | 29 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE; |
| 30 virtual void GoogleSigninSucceeded(const std::string& username, |
| 31 const std::string& password) OVERRIDE; |
30 | 32 |
31 private: | 33 private: |
32 Profile* profile_; | 34 Profile* profile_; |
33 | 35 |
34 DISALLOW_COPY_AND_ASSIGN(ChromeSigninClient); | 36 DISALLOW_COPY_AND_ASSIGN(ChromeSigninClient); |
35 }; | 37 }; |
36 | 38 |
37 #endif // CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ | 39 #endif // CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ |
OLD | NEW |