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

Side by Side Diff: net/test/url_request/url_request_mock_data_job.h

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: removed no longer needed forward declaration Created 3 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 unified diff | Download patch
« no previous file with comments | « net/ssl/test_ssl_private_key.cc ('k') | net/test/url_request/url_request_mock_data_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 NET_TEST_URL_REQUEST_URL_REQUEST_MOCK_DATA_JOB_H_ 5 #ifndef NET_TEST_URL_REQUEST_URL_REQUEST_MOCK_DATA_JOB_H_
6 #define NET_TEST_URL_REQUEST_URL_REQUEST_MOCK_DATA_JOB_H_ 6 #define NET_TEST_URL_REQUEST_URL_REQUEST_MOCK_DATA_JOB_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 12 matching lines...) Expand all
23 public: 23 public:
24 URLRequestMockDataJob(URLRequest* request, 24 URLRequestMockDataJob(URLRequest* request,
25 NetworkDelegate* network_delegate, 25 NetworkDelegate* network_delegate,
26 const std::string& data, 26 const std::string& data,
27 int data_repeat_count, 27 int data_repeat_count,
28 bool request_client_certificate); 28 bool request_client_certificate);
29 29
30 void Start() override; 30 void Start() override;
31 int ReadRawData(IOBuffer* buf, int buf_size) override; 31 int ReadRawData(IOBuffer* buf, int buf_size) override;
32 void GetResponseInfo(HttpResponseInfo* info) override; 32 void GetResponseInfo(HttpResponseInfo* info) override;
33 void ContinueWithCertificate(X509Certificate* client_cert, 33 void ContinueWithCertificate(
34 SSLPrivateKey* client_private_key) override; 34 scoped_refptr<X509Certificate> client_cert,
35 scoped_refptr<SSLPrivateKey> client_private_key) override;
35 36
36 // Adds the testing URLs to the URLRequestFilter. 37 // Adds the testing URLs to the URLRequestFilter.
37 static void AddUrlHandler(); 38 static void AddUrlHandler();
38 static void AddUrlHandlerForHostname(const std::string& hostname); 39 static void AddUrlHandlerForHostname(const std::string& hostname);
39 40
40 // Given data and repeat cound, constructs a mock URL that will return that 41 // Given data and repeat cound, constructs a mock URL that will return that
41 // data repeated |repeat_count| times when started. |data| must be safe for 42 // data repeated |repeat_count| times when started. |data| must be safe for
42 // URL. 43 // URL.
43 static GURL GetMockHttpUrl(const std::string& data, int repeat_count); 44 static GURL GetMockHttpUrl(const std::string& data, int repeat_count);
44 static GURL GetMockHttpsUrl(const std::string& data, int repeat_count); 45 static GURL GetMockHttpsUrl(const std::string& data, int repeat_count);
(...skipping 19 matching lines...) Expand all
64 65
65 std::string data_; 66 std::string data_;
66 size_t data_offset_; 67 size_t data_offset_;
67 bool request_client_certificate_; 68 bool request_client_certificate_;
68 base::WeakPtrFactory<URLRequestMockDataJob> weak_factory_; 69 base::WeakPtrFactory<URLRequestMockDataJob> weak_factory_;
69 }; 70 };
70 71
71 } // namespace net 72 } // namespace net
72 73
73 #endif // NET_TEST_URL_REQUEST_URL_REQUEST_MOCK_DATA_JOB_H_ 74 #endif // NET_TEST_URL_REQUEST_URL_REQUEST_MOCK_DATA_JOB_H_
OLDNEW
« no previous file with comments | « net/ssl/test_ssl_private_key.cc ('k') | net/test/url_request/url_request_mock_data_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698