Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: chrome/browser/signin/token_service.h

Issue 14121012: Make TokenService drop its ref to WebDataService in Shutdown() rather than dtor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pure merge 2 Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/signin/token_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/token_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698