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

Unified Diff: google_apis/gaia/oauth2_mint_token_flow.h

Issue 14329014: Identity API: Add token cache and identity.invalidateAuthToken. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix invalidation crash and stale tokens for signed out users Created 7 years, 8 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_mint_token_flow.h
diff --git a/google_apis/gaia/oauth2_mint_token_flow.h b/google_apis/gaia/oauth2_mint_token_flow.h
index 40850b4d1efaff12ec74aa09d0b3f2ac93af2ed4..e2824e6cab01465988001a142af058cf61d9864c 100644
--- a/google_apis/gaia/oauth2_mint_token_flow.h
+++ b/google_apis/gaia/oauth2_mint_token_flow.h
@@ -90,7 +90,8 @@ class OAuth2MintTokenFlow : public OAuth2ApiCallFlow {
class Delegate {
public:
- virtual void OnMintTokenSuccess(const std::string& access_token) {}
+ virtual void OnMintTokenSuccess(const std::string& access_token,
+ int time_to_live) {}
virtual void OnIssueAdviceSuccess(const IssueAdviceInfo& issue_advice) {}
virtual void OnMintTokenFailure(const GoogleServiceAuthError& error) {}
@@ -126,14 +127,15 @@ class OAuth2MintTokenFlow : public OAuth2ApiCallFlow {
FRIEND_TEST_ALL_PREFIXES(OAuth2MintTokenFlowTest,
ProcessMintAccessTokenFailure);
- void ReportSuccess(const std::string& access_token);
+ void ReportSuccess(const std::string& access_token, int time_to_live);
void ReportIssueAdviceSuccess(const IssueAdviceInfo& issue_advice);
void ReportFailure(const GoogleServiceAuthError& error);
static bool ParseIssueAdviceResponse(
const base::DictionaryValue* dict, IssueAdviceInfo* issue_advice);
static bool ParseMintTokenResponse(
- const base::DictionaryValue* dict, std::string* access_token);
+ const base::DictionaryValue* dict, std::string* access_token,
+ int* time_to_live);
Delegate* delegate_;
Parameters parameters_;

Powered by Google App Engine
This is Rietveld 408576698