| 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 cb38c2eb0e5a3a60a16db7dfbf16129ee71a3da8..3a2d39fb246962cbd73e173aa390b4cf5de5831b 100644
|
| --- a/google_apis/gaia/oauth2_token_service_delegate.h
|
| +++ b/google_apis/gaia/oauth2_token_service_delegate.h
|
| @@ -29,8 +29,9 @@ class OAuth2TokenServiceDelegate {
|
| OAuth2AccessTokenConsumer* consumer) = 0;
|
|
|
| virtual bool RefreshTokenIsAvailable(const std::string& account_id) const = 0;
|
| + virtual bool RefreshTokenHasError(const std::string& account_id) const;
|
| virtual void UpdateAuthError(const std::string& account_id,
|
| - const GoogleServiceAuthError& error){};
|
| + const GoogleServiceAuthError& error) {}
|
|
|
| virtual std::vector<std::string> GetAccounts();
|
| virtual void RevokeAllCredentials(){};
|
| @@ -70,6 +71,12 @@ class OAuth2TokenServiceDelegate {
|
| DISALLOW_COPY_AND_ASSIGN(ScopedBatchChange);
|
| };
|
|
|
| + // This function is called by derived classes to help implement
|
| + // RefreshTokenHasError(). It centralizes the code for determining if
|
| + // |error| is worthy of being reported as an error for purposes of
|
| + // RefreshTokenHasError().
|
| + static bool IsError(const GoogleServiceAuthError& error);
|
| +
|
| private:
|
| // List of observers to notify when refresh token availability changes.
|
| // Makes sure list is empty on destruction.
|
|
|