Index: chrome/browser/signin/token_service.h |
=================================================================== |
--- chrome/browser/signin/token_service.h (revision 177312) |
+++ chrome/browser/signin/token_service.h (working copy) |
@@ -143,8 +143,8 @@ |
// called. |
bool TokensLoadedFromDB() const; |
- // Returns true if the token service has all credentials needed to fetch |
- // tokens. |
+ // Returns true if the token service has either GAIA credentials or OAuth2 |
+ // tokens needed to fetch other service tokens. |
virtual bool AreCredentialsValid() const; |
// Tokens will be fetched for all services(sync, talk) in the background. |
@@ -159,6 +159,7 @@ |
// Typical use is to create an OAuth2 token for appropriate scope and then |
// use that token to call a Google API. |
virtual bool HasOAuthLoginToken() const; |
+ virtual bool HasOAuthLoginAccessToken() const; |
virtual const std::string& GetOAuth2LoginRefreshToken() const; |
const std::string& GetOAuth2LoginAccessToken() const; |
@@ -182,6 +183,9 @@ |
const WDTypedResult* result) OVERRIDE; |
protected: |
+ // Saves OAuth2 credentials. |
+ void SaveOAuth2Credentials(const ClientOAuthResult& result); |
+ |
void set_tokens_loaded(bool loaded) { |
tokens_loaded_ = loaded; |
} |