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

Unified Diff: chrome/browser/signin/token_service.h

Issue 11649055: OAuth2 sign-in flow for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang fix Created 7 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: chrome/browser/signin/token_service.h
diff --git a/chrome/browser/signin/token_service.h b/chrome/browser/signin/token_service.h
index 9903026a0df076a4e326bd8dc1643604402fa004..d1c9d682832664d3413948f1c8549d6e4a82ebfd 100644
--- a/chrome/browser/signin/token_service.h
+++ b/chrome/browser/signin/token_service.h
@@ -151,8 +151,8 @@ class TokenService : public GaiaAuthConsumer,
// 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.
@@ -167,6 +167,7 @@ class TokenService : public GaiaAuthConsumer,
// 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;
@@ -190,6 +191,9 @@ class TokenService : public GaiaAuthConsumer,
const WDTypedResult* result) OVERRIDE;
protected:
+ // Saves OAuth2 credentials.
+ void SaveOAuth2Credentials(const ClientOAuthResult& result);
+
void set_tokens_loaded(bool loaded) {
tokens_loaded_ = loaded;
}

Powered by Google App Engine
This is Rietveld 408576698