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 TokenService will supply authentication tokens for any service that | 5 // The TokenService will supply authentication tokens for any service that |
6 // needs it, such as sync. Whenever the user logs in, a controller watching | 6 // needs it, such as sync. Whenever the user logs in, a controller watching |
7 // the token service is expected to call ClientLogin to derive a new SID and | 7 // the token service is expected to call ClientLogin to derive a new SID and |
8 // LSID. Whenever such credentials are available, the TokenService should be | 8 // LSID. Whenever such credentials are available, the TokenService should be |
9 // updated with new credentials. The controller should then start fetching | 9 // updated with new credentials. The controller should then start fetching |
10 // tokens, which will be written to the database after retrieval, as well as | 10 // tokens, which will be written to the database after retrieval, as well as |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 virtual void OnIssueAuthTokenSuccess(const std::string& service, | 141 virtual void OnIssueAuthTokenSuccess(const std::string& service, |
142 const std::string& auth_token); | 142 const std::string& auth_token); |
143 virtual void OnIssueAuthTokenFailure(const std::string& service, | 143 virtual void OnIssueAuthTokenFailure(const std::string& service, |
144 const GoogleServiceAuthError& error); | 144 const GoogleServiceAuthError& error); |
145 | 145 |
146 // WebDataServiceConsumer implementation. | 146 // WebDataServiceConsumer implementation. |
147 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, | 147 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, |
148 const WDTypedResult* result); | 148 const WDTypedResult* result); |
149 | 149 |
150 // NotificationObserver implementation. | 150 // NotificationObserver implementation. |
151 virtual void Observe(NotificationType type, | 151 virtual void Observe(int type, |
152 const NotificationSource& source, | 152 const NotificationSource& source, |
153 const NotificationDetails& details); | 153 const NotificationDetails& details); |
154 | 154 |
155 private: | 155 private: |
156 | 156 |
157 void FireTokenAvailableNotification(const std::string& service, | 157 void FireTokenAvailableNotification(const std::string& service, |
158 const std::string& auth_token); | 158 const std::string& auth_token); |
159 | 159 |
160 void FireTokenRequestFailedNotification(const std::string& service, | 160 void FireTokenRequestFailedNotification(const std::string& service, |
161 const GoogleServiceAuthError& error); | 161 const GoogleServiceAuthError& error); |
(...skipping 28 matching lines...) Expand all Loading... |
190 | 190 |
191 NotificationRegistrar registrar_; | 191 NotificationRegistrar registrar_; |
192 | 192 |
193 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryBasic); | 193 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryBasic); |
194 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryAdvanced); | 194 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryAdvanced); |
195 | 195 |
196 DISALLOW_COPY_AND_ASSIGN(TokenService); | 196 DISALLOW_COPY_AND_ASSIGN(TokenService); |
197 }; | 197 }; |
198 | 198 |
199 #endif // CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_H_ | 199 #endif // CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_H_ |
OLD | NEW |