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

Side by Side Diff: chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.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
« no previous file with comments | « no previous file | chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CHROME_BROWSER_SIGNIN_MUTABLE_PROFILE_OAUTH2_TOKEN_SERVICE_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_SIGNIN_MUTABLE_PROFILE_OAUTH2_TOKEN_SERVICE_DELEGATE_H_
6 #define CHROME_BROWSER_SIGNIN_MUTABLE_PROFILE_OAUTH2_TOKEN_SERVICE_DELEGATE_H_ 6 #define CHROME_BROWSER_SIGNIN_MUTABLE_PROFILE_OAUTH2_TOKEN_SERVICE_DELEGATE_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void LoadCredentials(const std::string& primary_account_id) override; 47 void LoadCredentials(const std::string& primary_account_id) override;
48 void UpdateCredentials(const std::string& account_id, 48 void UpdateCredentials(const std::string& account_id,
49 const std::string& refresh_token) override; 49 const std::string& refresh_token) override;
50 void RevokeAllCredentials() override; 50 void RevokeAllCredentials() override;
51 51
52 // Revokes credentials related to |account_id|. 52 // Revokes credentials related to |account_id|.
53 void RevokeCredentials(const std::string& account_id) override; 53 void RevokeCredentials(const std::string& account_id) override;
54 54
55 // Overridden from OAuth2TokenServiceDelegate. 55 // Overridden from OAuth2TokenServiceDelegate.
56 void Shutdown() override; 56 void Shutdown() override;
57 LoadCredentialsState GetLoadCredentialsState() const override;
57 58
58 // Overridden from NetworkChangeObserver. 59 // Overridden from NetworkChangeObserver.
59 void OnNetworkChanged(net::NetworkChangeNotifier::ConnectionType type) 60 void OnNetworkChanged(net::NetworkChangeNotifier::ConnectionType type)
60 override; 61 override;
61 62
62 // Overridden from OAuth2TokenServiceDelegate. 63 // Overridden from OAuth2TokenServiceDelegate.
63 const net::BackoffEntry* BackoffEntry() const override; 64 const net::BackoffEntry* BackoffEntry() const override;
64 65
65 // Returns the account's refresh token used for testing purposes. 66 // Returns the account's refresh token used for testing purposes.
66 std::string GetRefreshTokenForTest(const std::string& account_id) const; 67 std::string GetRefreshTokenForTest(const std::string& account_id) const;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // In memory refresh token store mapping account_id to refresh_token. 145 // In memory refresh token store mapping account_id to refresh_token.
145 AccountStatusMap refresh_tokens_; 146 AccountStatusMap refresh_tokens_;
146 147
147 // Handle to the request reading tokens from database. 148 // Handle to the request reading tokens from database.
148 WebDataServiceBase::Handle web_data_service_request_; 149 WebDataServiceBase::Handle web_data_service_request_;
149 150
150 // The primary account id of this service's profile during the loading of 151 // The primary account id of this service's profile during the loading of
151 // credentials. This member is empty otherwise. 152 // credentials. This member is empty otherwise.
152 std::string loading_primary_account_id_; 153 std::string loading_primary_account_id_;
153 154
155 // The state of the load credentials operation.
156 LoadCredentialsState load_credentials_state_;
157
154 ScopedVector<RevokeServerRefreshToken> server_revokes_; 158 ScopedVector<RevokeServerRefreshToken> server_revokes_;
155 159
156 // Used to verify that certain methods are called only on the thread on which 160 // Used to verify that certain methods are called only on the thread on which
157 // this instance was created. 161 // this instance was created.
158 base::ThreadChecker thread_checker_; 162 base::ThreadChecker thread_checker_;
159 163
160 // Used to rate-limit network token requests so as to not overload the server. 164 // Used to rate-limit network token requests so as to not overload the server.
161 net::BackoffEntry::Policy backoff_policy_; 165 net::BackoffEntry::Policy backoff_policy_;
162 net::BackoffEntry backoff_entry_; 166 net::BackoffEntry backoff_entry_;
163 GoogleServiceAuthError backoff_error_; 167 GoogleServiceAuthError backoff_error_;
164 168
165 SigninClient* client_; 169 SigninClient* client_;
166 SigninErrorController* signin_error_controller_; 170 SigninErrorController* signin_error_controller_;
167 AccountTrackerService* account_tracker_service_; 171 AccountTrackerService* account_tracker_service_;
168 172
169 DISALLOW_COPY_AND_ASSIGN(MutableProfileOAuth2TokenServiceDelegate); 173 DISALLOW_COPY_AND_ASSIGN(MutableProfileOAuth2TokenServiceDelegate);
170 }; 174 };
171 175
172 #endif // CHROME_BROWSER_SIGNIN_MUTABLE_PROFILE_OAUTH2_TOKEN_SERVICE_DELEGATE_H _ 176 #endif // CHROME_BROWSER_SIGNIN_MUTABLE_PROFILE_OAUTH2_TOKEN_SERVICE_DELEGATE_H _
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698