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

Side by Side Diff: components/signin/core/browser/about_signin_internals.h

Issue 2672833002: [Desktop] Add diagnostics about loading the refresh tokens. (Closed)
Patch Set: Fix compile Created 3 years, 10 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
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 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_ 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_ 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 19 matching lines...) Expand all
30 30
31 // Many values in SigninStatus are also associated with a timestamp. 31 // Many values in SigninStatus are also associated with a timestamp.
32 // This makes it easier to keep values and their associated times together. 32 // This makes it easier to keep values and their associated times together.
33 using TimedSigninStatusValue = std::pair<std::string, std::string>; 33 using TimedSigninStatusValue = std::pair<std::string, std::string>;
34 34
35 // This class collects authentication, signin and token information 35 // This class collects authentication, signin and token information
36 // to propagate to about:signin-internals via SigninInternalsUI. 36 // to propagate to about:signin-internals via SigninInternalsUI.
37 class AboutSigninInternals 37 class AboutSigninInternals
38 : public KeyedService, 38 : public KeyedService,
39 public signin_internals_util::SigninDiagnosticsObserver, 39 public signin_internals_util::SigninDiagnosticsObserver,
40 public OAuth2TokenService::Observer,
40 public OAuth2TokenService::DiagnosticsObserver, 41 public OAuth2TokenService::DiagnosticsObserver,
41 public GaiaCookieManagerService::Observer, 42 public GaiaCookieManagerService::Observer,
42 SigninManagerBase::Observer, 43 SigninManagerBase::Observer,
43 SigninErrorController::Observer { 44 SigninErrorController::Observer {
44 public: 45 public:
45 class Observer { 46 class Observer {
46 public: 47 public:
47 // |info| will contain the dictionary of signin_status_ values as indicated 48 // |info| will contain the dictionary of signin_status_ values as indicated
48 // in the comments for GetSigninStatus() below. 49 // in the comments for GetSigninStatus() below.
49 virtual void OnSigninStateChanged(const base::DictionaryValue* info) = 0; 50 virtual void OnSigninStateChanged(const base::DictionaryValue* info) = 0;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 const std::string& consumer_id, 178 const std::string& consumer_id,
178 const OAuth2TokenService::ScopeSet& scopes) override; 179 const OAuth2TokenService::ScopeSet& scopes) override;
179 void OnFetchAccessTokenComplete(const std::string& account_id, 180 void OnFetchAccessTokenComplete(const std::string& account_id,
180 const std::string& consumer_id, 181 const std::string& consumer_id,
181 const OAuth2TokenService::ScopeSet& scopes, 182 const OAuth2TokenService::ScopeSet& scopes,
182 GoogleServiceAuthError error, 183 GoogleServiceAuthError error,
183 base::Time expiration_time) override; 184 base::Time expiration_time) override;
184 void OnTokenRemoved(const std::string& account_id, 185 void OnTokenRemoved(const std::string& account_id,
185 const OAuth2TokenService::ScopeSet& scopes) override; 186 const OAuth2TokenService::ScopeSet& scopes) override;
186 187
188 // OAuth2TokenServiceDelegate::Observer implementations.
189 void OnRefreshTokensLoaded() override;
190
187 // SigninManagerBase::Observer implementations. 191 // SigninManagerBase::Observer implementations.
188 void GoogleSigninFailed(const GoogleServiceAuthError& error) override; 192 void GoogleSigninFailed(const GoogleServiceAuthError& error) override;
189 void GoogleSigninSucceeded(const std::string& account_id, 193 void GoogleSigninSucceeded(const std::string& account_id,
190 const std::string& username, 194 const std::string& username,
191 const std::string& password) override; 195 const std::string& password) override;
192 void GoogleSignedOut(const std::string& account_id, 196 void GoogleSignedOut(const std::string& account_id,
193 const std::string& username) override; 197 const std::string& username) override;
194 198
195 void NotifyObservers(); 199 void NotifyObservers();
196 200
(...skipping 21 matching lines...) Expand all
218 // Encapsulates the actual signin and token related values. 222 // Encapsulates the actual signin and token related values.
219 // Most of the values are mirrored in the prefs for persistence. 223 // Most of the values are mirrored in the prefs for persistence.
220 SigninStatus signin_status_; 224 SigninStatus signin_status_;
221 225
222 base::ObserverList<Observer> signin_observers_; 226 base::ObserverList<Observer> signin_observers_;
223 227
224 DISALLOW_COPY_AND_ASSIGN(AboutSigninInternals); 228 DISALLOW_COPY_AND_ASSIGN(AboutSigninInternals);
225 }; 229 };
226 230
227 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_ 231 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698