Chromium Code Reviews| Index: net/test/url_request/url_request_mock_data_job.h |
| diff --git a/net/test/url_request/url_request_mock_data_job.h b/net/test/url_request/url_request_mock_data_job.h |
| index 14ad665369f641bccc99544ab409810eb59f9868..e1a13c036e31349c64bb85968d7f46aaf470df52 100644 |
| --- a/net/test/url_request/url_request_mock_data_job.h |
| +++ b/net/test/url_request/url_request_mock_data_job.h |
| @@ -21,12 +21,15 @@ class URLRequestMockDataJob : public URLRequestJob { |
| URLRequestMockDataJob(URLRequest* request, |
| NetworkDelegate* network_delegate, |
| const std::string& data, |
| - int data_repeat_count); |
| + int data_repeat_count, |
| + bool request_client_certificate); |
| void Start() override; |
| int ReadRawData(IOBuffer* buf, int buf_size) override; |
| int GetResponseCode() const override; |
| void GetResponseInfo(HttpResponseInfo* info) override; |
| + void ContinueWithCertificate(X509Certificate* client_cert, |
| + SSLPrivateKey* client_private_key) override; |
| // Adds the testing URLs to the URLRequestFilter. |
| static void AddUrlHandler(); |
| @@ -38,6 +41,9 @@ class URLRequestMockDataJob : public URLRequestJob { |
| static GURL GetMockHttpUrl(const std::string& data, int repeat_count); |
| static GURL GetMockHttpsUrl(const std::string& data, int repeat_count); |
| + // Constructs Mock URL which will request client certificate. |
|
xunjieli
2015/11/20 21:04:25
Maybe mention that the response body is the word "
mef
2015/11/20 22:01:23
Done.
|
| + static GURL GetMockUrlForClientCertificateRequest(); |
| + |
| // URLRequestFailedJob must be added as a handler for |hostname| for |
| // the returned URL to return |net_error|. |
| static GURL GetMockHttpUrlForHostname(const std::string& hostname, |
| @@ -55,6 +61,7 @@ class URLRequestMockDataJob : public URLRequestJob { |
| std::string data_; |
| size_t data_offset_; |
| + bool request_client_certificate_; |
| base::WeakPtrFactory<URLRequestMockDataJob> weak_factory_; |
| }; |