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

Unified Diff: chrome/common/net/gaia/oauth2_mint_token_flow.h

Issue 10630021: Modify experimental identity flow to display scope descriptions and details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 6 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/common/net/gaia/oauth2_mint_token_flow.h
diff --git a/chrome/common/net/gaia/oauth2_mint_token_flow.h b/chrome/common/net/gaia/oauth2_mint_token_flow.h
index 058012d984ea778ba07553dd0edd7844ae1cdb78..bae911c64becfb8cd1d40feb2963d08c16523a87 100644
--- a/chrome/common/net/gaia/oauth2_mint_token_flow.h
+++ b/chrome/common/net/gaia/oauth2_mint_token_flow.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/memory/weak_ptr.h"
#include "chrome/common/net/gaia/oauth2_api_call_flow.h"
class GoogleServiceAuthError;
@@ -27,7 +28,7 @@ class URLRequestContextGetter;
// IssueAdvice: messages to show to the user to get a user's approval.
// The structure is as follows:
-// * Descritpion 1
+// * Description 1
// - Detail 1.1
// - Details 1.2
// * Description 2
@@ -114,6 +115,10 @@ class OAuth2MintTokenFlow : public OAuth2ApiCallFlow {
virtual void Start() OVERRIDE;
+ // Starts the flow, and deletes |this| when done. Useful when the caller
+ // does not care about the response (|delegate_| is NULL).
+ void FireAndForget();
+
protected:
// Implementation of template methods in OAuth2ApiCallFlow.
virtual GURL CreateApiCallUrl() OVERRIDE;
@@ -138,7 +143,7 @@ class OAuth2MintTokenFlow : public OAuth2ApiCallFlow {
ProcessMintAccessTokenFailure);
void ReportSuccess(const std::string& access_token);
- void ReportSuccess(const IssueAdviceInfo& issue_advice);
+ void ReportIssueAdviceSuccess(const IssueAdviceInfo& issue_advice);
void ReportFailure(const GoogleServiceAuthError& error);
static bool ParseIssueAdviceResponse(
@@ -149,6 +154,10 @@ class OAuth2MintTokenFlow : public OAuth2ApiCallFlow {
net::URLRequestContextGetter* context_;
Delegate* delegate_;
Parameters parameters_;
+ // If true, |this| owns itself and will delete itself after reporting
+ // success or failure.
+ bool delete_when_done_;
+ base::WeakPtrFactory<OAuth2MintTokenFlow> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(OAuth2MintTokenFlow);
};
« no previous file with comments | « chrome/common/extensions/permissions/permission_set.h ('k') | chrome/common/net/gaia/oauth2_mint_token_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698