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 COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_OAUTH_HELPER_H_ | 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_OAUTH_HELPER_H_ |
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_OAUTH_HELPER_H_ | 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_OAUTH_HELPER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 // Called when an error occurs while getting the information. | 32 // Called when an error occurs while getting the information. |
33 virtual void OnSigninOAuthInformationFailure( | 33 virtual void OnSigninOAuthInformationFailure( |
34 const GoogleServiceAuthError& error) {} | 34 const GoogleServiceAuthError& error) {} |
35 }; | 35 }; |
36 | 36 |
37 explicit SigninOAuthHelper(net::URLRequestContextGetter* getter, | 37 explicit SigninOAuthHelper(net::URLRequestContextGetter* getter, |
38 const std::string& session_index, | 38 const std::string& session_index, |
39 const std::string& signin_scoped_device_id, | 39 const std::string& signin_scoped_device_id, |
40 Consumer* consumer); | 40 Consumer* consumer); |
41 virtual ~SigninOAuthHelper(); | 41 ~SigninOAuthHelper() override; |
42 | 42 |
43 private: | 43 private: |
44 // Overridden from GaiaAuthConsumer. | 44 // Overridden from GaiaAuthConsumer. |
45 virtual void OnClientOAuthSuccess(const ClientOAuthResult& result) override; | 45 void OnClientOAuthSuccess(const ClientOAuthResult& result) override; |
46 virtual void OnClientOAuthFailure(const GoogleServiceAuthError& error) | 46 void OnClientOAuthFailure(const GoogleServiceAuthError& error) override; |
47 override; | 47 void OnClientLoginSuccess(const ClientLoginResult& result) override; |
48 virtual void OnClientLoginSuccess(const ClientLoginResult& result) override; | 48 void OnClientLoginFailure(const GoogleServiceAuthError& error) override; |
49 virtual void OnClientLoginFailure(const GoogleServiceAuthError& error) | 49 void OnGetUserInfoSuccess(const UserInfoMap& data) override; |
50 override; | 50 void OnGetUserInfoFailure(const GoogleServiceAuthError& error) override; |
51 virtual void OnGetUserInfoSuccess(const UserInfoMap& data) override; | |
52 virtual void OnGetUserInfoFailure(const GoogleServiceAuthError& error) | |
53 override; | |
54 | 51 |
55 GaiaAuthFetcher gaia_auth_fetcher_; | 52 GaiaAuthFetcher gaia_auth_fetcher_; |
56 std::string refresh_token_; | 53 std::string refresh_token_; |
57 Consumer* consumer_; | 54 Consumer* consumer_; |
58 | 55 |
59 DISALLOW_COPY_AND_ASSIGN(SigninOAuthHelper); | 56 DISALLOW_COPY_AND_ASSIGN(SigninOAuthHelper); |
60 }; | 57 }; |
61 | 58 |
62 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_OAUTH_HELPER_H_ | 59 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_OAUTH_HELPER_H_ |
OLD | NEW |