OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 either to call ClientLogin to derive a new | 7 // the token service is expected either to call ClientLogin to derive a new |
8 // SID and LSID, or to use GAIA OAuth requests to derive an OAuth1 access | 8 // SID and LSID, or to use GAIA OAuth requests to derive an OAuth1 access |
9 // token for the OAuthLogin scope. Whenever such credentials are available, | 9 // token for the OAuthLogin scope. Whenever such credentials are available, |
10 // the TokenService should be updated with new credentials. The controller | 10 // the TokenService should be updated with new credentials. The controller |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 TokenRequestFailedDetails(const std::string& service, | 95 TokenRequestFailedDetails(const std::string& service, |
96 const GoogleServiceAuthError& error) | 96 const GoogleServiceAuthError& error) |
97 : service_(service), error_(error) {} | 97 : service_(service), error_(error) {} |
98 const std::string& service() const { return service_; } | 98 const std::string& service() const { return service_; } |
99 const GoogleServiceAuthError& error() const { return error_; } | 99 const GoogleServiceAuthError& error() const { return error_; } |
100 private: | 100 private: |
101 std::string service_; | 101 std::string service_; |
102 GoogleServiceAuthError error_; | 102 GoogleServiceAuthError error_; |
103 }; | 103 }; |
104 | 104 |
| 105 // ProfileKeyedService implementation. |
| 106 virtual void Shutdown() OVERRIDE; |
| 107 |
105 // Methods to register or remove SigninDiagnosticObservers | 108 // Methods to register or remove SigninDiagnosticObservers |
106 void AddSigninDiagnosticsObserver( | 109 void AddSigninDiagnosticsObserver( |
107 signin_internals_util::SigninDiagnosticsObserver* observer); | 110 signin_internals_util::SigninDiagnosticsObserver* observer); |
108 void RemoveSigninDiagnosticsObserver( | 111 void RemoveSigninDiagnosticsObserver( |
109 signin_internals_util::SigninDiagnosticsObserver* observer); | 112 signin_internals_util::SigninDiagnosticsObserver* observer); |
110 | 113 |
111 // Initialize this token service with a request source | 114 // Initialize this token service with a request source |
112 // (usually from a GaiaAuthConsumer constant), and the profile. | 115 // (usually from a GaiaAuthConsumer constant), and the profile. |
113 // Typically you'd then update the credentials. | 116 // Typically you'd then update the credentials. |
114 void Initialize(const char* const source, Profile* profile); | 117 void Initialize(const char* const source, Profile* profile); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 256 |
254 friend class TokenServiceTest; | 257 friend class TokenServiceTest; |
255 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryBasic); | 258 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryBasic); |
256 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryAdvanced); | 259 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryAdvanced); |
257 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, FullIntegrationNewServicesAdded); | 260 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, FullIntegrationNewServicesAdded); |
258 | 261 |
259 DISALLOW_COPY_AND_ASSIGN(TokenService); | 262 DISALLOW_COPY_AND_ASSIGN(TokenService); |
260 }; | 263 }; |
261 | 264 |
262 #endif // CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_H_ | 265 #endif // CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_H_ |
OLD | NEW |