OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_COMMON_NET_GAIA_OAUTH2_MINT_TOKEN_FLOW_H_ | 5 #ifndef CHROME_COMMON_NET_GAIA_OAUTH2_MINT_TOKEN_FLOW_H_ |
6 #define CHROME_COMMON_NET_GAIA_OAUTH2_MINT_TOKEN_FLOW_H_ | 6 #define CHROME_COMMON_NET_GAIA_OAUTH2_MINT_TOKEN_FLOW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 virtual ~OAuth2MintTokenFlow(); | 112 virtual ~OAuth2MintTokenFlow(); |
113 | 113 |
114 virtual void Start() OVERRIDE; | 114 virtual void Start() OVERRIDE; |
115 | 115 |
116 protected: | 116 protected: |
117 // Implementation of template methods in OAuth2ApiCallFlow. | 117 // Implementation of template methods in OAuth2ApiCallFlow. |
118 virtual GURL CreateApiCallUrl() OVERRIDE; | 118 virtual GURL CreateApiCallUrl() OVERRIDE; |
119 virtual std::string CreateApiCallBody() OVERRIDE; | 119 virtual std::string CreateApiCallBody() OVERRIDE; |
120 | 120 |
121 virtual void ProcessApiCallSuccess( | 121 virtual void ProcessApiCallSuccess( |
122 const content::URLFetcher* source) OVERRIDE; | 122 const net::URLFetcher* source) OVERRIDE; |
123 virtual void ProcessApiCallFailure( | 123 virtual void ProcessApiCallFailure( |
124 const content::URLFetcher* source) OVERRIDE; | 124 const net::URLFetcher* source) OVERRIDE; |
125 virtual void ProcessNewAccessToken(const std::string& access_token) OVERRIDE; | 125 virtual void ProcessNewAccessToken(const std::string& access_token) OVERRIDE; |
126 virtual void ProcessMintAccessTokenFailure( | 126 virtual void ProcessMintAccessTokenFailure( |
127 const GoogleServiceAuthError& error) OVERRIDE; | 127 const GoogleServiceAuthError& error) OVERRIDE; |
128 | 128 |
129 private: | 129 private: |
130 friend class OAuth2MintTokenFlowTest; | 130 friend class OAuth2MintTokenFlowTest; |
131 FRIEND_TEST_ALL_PREFIXES(OAuth2MintTokenFlowTest, CreateApiCallBody); | 131 FRIEND_TEST_ALL_PREFIXES(OAuth2MintTokenFlowTest, CreateApiCallBody); |
132 FRIEND_TEST_ALL_PREFIXES(OAuth2MintTokenFlowTest, ParseIssueAdviceResponse); | 132 FRIEND_TEST_ALL_PREFIXES(OAuth2MintTokenFlowTest, ParseIssueAdviceResponse); |
133 FRIEND_TEST_ALL_PREFIXES(OAuth2MintTokenFlowTest, ParseMintTokenResponse); | 133 FRIEND_TEST_ALL_PREFIXES(OAuth2MintTokenFlowTest, ParseMintTokenResponse); |
134 FRIEND_TEST_ALL_PREFIXES(OAuth2MintTokenFlowTest, ProcessApiCallSuccess); | 134 FRIEND_TEST_ALL_PREFIXES(OAuth2MintTokenFlowTest, ProcessApiCallSuccess); |
(...skipping 11 matching lines...) Expand all Loading... |
146 const base::DictionaryValue* dict, std::string* access_token); | 146 const base::DictionaryValue* dict, std::string* access_token); |
147 | 147 |
148 net::URLRequestContextGetter* context_; | 148 net::URLRequestContextGetter* context_; |
149 Delegate* delegate_; | 149 Delegate* delegate_; |
150 Parameters parameters_; | 150 Parameters parameters_; |
151 | 151 |
152 DISALLOW_COPY_AND_ASSIGN(OAuth2MintTokenFlow); | 152 DISALLOW_COPY_AND_ASSIGN(OAuth2MintTokenFlow); |
153 }; | 153 }; |
154 | 154 |
155 #endif // CHROME_COMMON_NET_GAIA_OAUTH2_MINT_TOKEN_FLOW_H_ | 155 #endif // CHROME_COMMON_NET_GAIA_OAUTH2_MINT_TOKEN_FLOW_H_ |
OLD | NEW |