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

Unified Diff: google_apis/gaia/oauth2_token_service_delegate.h

Issue 2672833002: [Desktop] Add diagnostics about loading the refresh tokens. (Closed)
Patch Set: Nit Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: google_apis/gaia/oauth2_token_service_delegate.h
diff --git a/google_apis/gaia/oauth2_token_service_delegate.h b/google_apis/gaia/oauth2_token_service_delegate.h
index 1f6477bc42df6c9e9a252a20f51a43578eb2cc87..ca74df405a80a000fb2798984c914f55528f5bba 100644
--- a/google_apis/gaia/oauth2_token_service_delegate.h
+++ b/google_apis/gaia/oauth2_token_service_delegate.h
@@ -20,6 +20,16 @@ class URLRequestContextGetter;
// CreateAccessTokenFetcher properly.
class OAuth2TokenServiceDelegate {
public:
+ enum LoadCredentialsState {
+ LOAD_CREDENTIALS_UNKNOWN,
+ LOAD_CREDENTIALS_NOT_STARTED,
+ LOAD_CREDENTIALS_IN_PROGRESS,
+ LOAD_CREDENTIALS_FINISHED_WITH_SUCCESS,
+ LOAD_CREDENTIALS_FINISHED_WITH_DB_ERRORS,
+ LOAD_CREDENTIALS_FINISHED_WITH_DECRYPT_ERRORS,
+ LOAD_CREDENTIALS_FINISHED_WITH_UNKNOWN_ERRORS,
+ };
+
OAuth2TokenServiceDelegate();
virtual ~OAuth2TokenServiceDelegate();
@@ -58,6 +68,13 @@ class OAuth2TokenServiceDelegate {
// a nullptr otherwise.
virtual const net::BackoffEntry* BackoffEntry() const;
+ // Diagnostic methods
+
+ // Returns the state of the load credentials operation.
+ virtual LoadCredentialsState GetLoadCredentialsState() const {
+ return LOAD_CREDENTIALS_UNKNOWN;
+ }
+
protected:
// Called by subclasses to notify observers.
virtual void FireRefreshTokenAvailable(const std::string& account_id);

Powered by Google App Engine
This is Rietveld 408576698