OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // The signin manager encapsulates some functionality tracking | 5 // The signin manager encapsulates some functionality tracking |
6 // which user is signed in. When a user is signed in, a ClientLogin | 6 // which user is signed in. When a user is signed in, a ClientLogin |
7 // request is run on their behalf. Auth tokens are fetched from Google | 7 // request is run on their behalf. Auth tokens are fetched from Google |
8 // and the results are stored in the TokenService. | 8 // and the results are stored in the TokenService. |
9 | 9 |
10 #ifndef CHROME_BROWSER_SYNC_SIGNIN_MANAGER_H_ | 10 #ifndef CHROME_BROWSER_SYNC_SIGNIN_MANAGER_H_ |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 virtual void OnGetOAuthTokenSuccess(const std::string& oauth_token) OVERRIDE; | 97 virtual void OnGetOAuthTokenSuccess(const std::string& oauth_token) OVERRIDE; |
98 virtual void OnGetOAuthTokenFailure() OVERRIDE; | 98 virtual void OnGetOAuthTokenFailure() OVERRIDE; |
99 virtual void OnOAuthGetAccessTokenSuccess(const std::string& token, | 99 virtual void OnOAuthGetAccessTokenSuccess(const std::string& token, |
100 const std::string& secret) OVERRIDE; | 100 const std::string& secret) OVERRIDE; |
101 virtual void OnOAuthGetAccessTokenFailure( | 101 virtual void OnOAuthGetAccessTokenFailure( |
102 const GoogleServiceAuthError& error) OVERRIDE; | 102 const GoogleServiceAuthError& error) OVERRIDE; |
103 virtual void OnOAuthWrapBridgeSuccess(const std::string& service_name, | 103 virtual void OnOAuthWrapBridgeSuccess(const std::string& service_name, |
104 const std::string& token, | 104 const std::string& token, |
105 const std::string& expires_in) | 105 const std::string& expires_in) |
106 OVERRIDE; | 106 OVERRIDE; |
107 virtual void OnOAuthWrapBridgeFailure(const GoogleServiceAuthError& error); | 107 virtual void OnOAuthWrapBridgeFailure(const std::string& service_name, |
| 108 const GoogleServiceAuthError& error); |
108 virtual void OnUserInfoSuccess(const std::string& email) OVERRIDE; | 109 virtual void OnUserInfoSuccess(const std::string& email) OVERRIDE; |
109 virtual void OnUserInfoFailure(const GoogleServiceAuthError& error) OVERRIDE; | 110 virtual void OnUserInfoFailure(const GoogleServiceAuthError& error) OVERRIDE; |
110 | 111 |
111 // NotificationObserver | 112 // NotificationObserver |
112 virtual void Observe(int type, | 113 virtual void Observe(int type, |
113 const NotificationSource& source, | 114 const NotificationSource& source, |
114 const NotificationDetails& details) OVERRIDE; | 115 const NotificationDetails& details) OVERRIDE; |
115 | 116 |
116 private: | 117 private: |
117 void PrepareForSignin(); | 118 void PrepareForSignin(); |
(...skipping 15 matching lines...) Expand all Loading... |
133 // Actual OAuth login handler. | 134 // Actual OAuth login handler. |
134 scoped_ptr<GaiaOAuthFetcher> oauth_login_; | 135 scoped_ptr<GaiaOAuthFetcher> oauth_login_; |
135 | 136 |
136 // Register for notifications from the TokenService. | 137 // Register for notifications from the TokenService. |
137 NotificationRegistrar registrar_; | 138 NotificationRegistrar registrar_; |
138 | 139 |
139 DISALLOW_COPY_AND_ASSIGN(SigninManager); | 140 DISALLOW_COPY_AND_ASSIGN(SigninManager); |
140 }; | 141 }; |
141 | 142 |
142 #endif // CHROME_BROWSER_SYNC_SIGNIN_MANAGER_H_ | 143 #endif // CHROME_BROWSER_SYNC_SIGNIN_MANAGER_H_ |
OLD | NEW |