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

Side by Side Diff: net/http/http_stream_factory_test_util.h

Issue 2935293002: HttpStreamFactoryImpl::Job cleanup. (Closed)
Patch Set: Re: #7. 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
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_
6 #define NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ 6 #define NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "net/http/http_stream.h" 11 #include "net/http/http_stream.h"
12 #include "net/http/http_stream_factory.h" 12 #include "net/http/http_stream_factory.h"
13 #include "net/http/http_stream_factory_impl.h" 13 #include "net/http/http_stream_factory_impl.h"
14 #include "net/http/http_stream_factory_impl_job.h" 14 #include "net/http/http_stream_factory_impl_job.h"
15 #include "net/http/http_stream_factory_impl_job_controller.h" 15 #include "net/http/http_stream_factory_impl_job_controller.h"
16 #include "net/proxy/proxy_info.h" 16 #include "net/proxy/proxy_info.h"
17 #include "net/proxy/proxy_server.h" 17 #include "net/proxy/proxy_server.h"
18 #include "net/socket/next_proto.h"
18 #include "testing/gmock/include/gmock/gmock.h" 19 #include "testing/gmock/include/gmock/gmock.h"
19 20
20 using testing::_; 21 using testing::_;
21 using testing::Invoke; 22 using testing::Invoke;
22 23
23 namespace net { 24 namespace net {
24 25
25 class HttpStreamFactoryImplPeer { 26 class HttpStreamFactoryImplPeer {
26 public: 27 public:
27 static void AddJobController( 28 static void AddJobController(
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 MockHttpStreamFactoryImplJob(HttpStreamFactoryImpl::Job::Delegate* delegate, 108 MockHttpStreamFactoryImplJob(HttpStreamFactoryImpl::Job::Delegate* delegate,
108 HttpStreamFactoryImpl::JobType job_type, 109 HttpStreamFactoryImpl::JobType job_type,
109 HttpNetworkSession* session, 110 HttpNetworkSession* session,
110 const HttpRequestInfo& request_info, 111 const HttpRequestInfo& request_info,
111 RequestPriority priority, 112 RequestPriority priority,
112 ProxyInfo proxy_info, 113 ProxyInfo proxy_info,
113 const SSLConfig& server_ssl_config, 114 const SSLConfig& server_ssl_config,
114 const SSLConfig& proxy_ssl_config, 115 const SSLConfig& proxy_ssl_config,
115 HostPortPair destination, 116 HostPortPair destination,
116 GURL origin_url, 117 GURL origin_url,
117 bool enable_ip_based_pooling, 118 NextProto alternative_protocol,
118 NetLog* net_log);
119
120 MockHttpStreamFactoryImplJob(HttpStreamFactoryImpl::Job::Delegate* delegate,
121 HttpStreamFactoryImpl::JobType job_type,
122 HttpNetworkSession* session,
123 const HttpRequestInfo& request_info,
124 RequestPriority priority,
125 ProxyInfo proxy_info,
126 const SSLConfig& server_ssl_config,
127 const SSLConfig& proxy_ssl_config,
128 HostPortPair destination,
129 GURL origin_url,
130 AlternativeService alternative_service,
131 const ProxyServer& alternative_proxy_server, 119 const ProxyServer& alternative_proxy_server,
132 bool enable_ip_based_pooling, 120 bool enable_ip_based_pooling,
133 NetLog* net_log); 121 NetLog* net_log);
134 122
135 ~MockHttpStreamFactoryImplJob() override; 123 ~MockHttpStreamFactoryImplJob() override;
136 124
137 MOCK_METHOD0(Resume, void()); 125 MOCK_METHOD0(Resume, void());
138 126
139 MOCK_METHOD0(Orphan, void()); 127 MOCK_METHOD0(Orphan, void());
140 }; 128 };
(...skipping 22 matching lines...) Expand all
163 HttpStreamFactoryImpl::Job::Delegate* delegate, 151 HttpStreamFactoryImpl::Job::Delegate* delegate,
164 HttpStreamFactoryImpl::JobType job_type, 152 HttpStreamFactoryImpl::JobType job_type,
165 HttpNetworkSession* session, 153 HttpNetworkSession* session,
166 const HttpRequestInfo& request_info, 154 const HttpRequestInfo& request_info,
167 RequestPriority priority, 155 RequestPriority priority,
168 const ProxyInfo& proxy_info, 156 const ProxyInfo& proxy_info,
169 const SSLConfig& server_ssl_config, 157 const SSLConfig& server_ssl_config,
170 const SSLConfig& proxy_ssl_config, 158 const SSLConfig& proxy_ssl_config,
171 HostPortPair destination, 159 HostPortPair destination,
172 GURL origin_url, 160 GURL origin_url,
173 AlternativeService alternative_service, 161 NextProto alternative_protocol,
174 bool enable_ip_based_pooling, 162 bool enable_ip_based_pooling,
175 NetLog* net_log) override; 163 NetLog* net_log) override;
176 164
177 std::unique_ptr<HttpStreamFactoryImpl::Job> CreateAltProxyJob( 165 std::unique_ptr<HttpStreamFactoryImpl::Job> CreateAltProxyJob(
178 HttpStreamFactoryImpl::Job::Delegate* delegate, 166 HttpStreamFactoryImpl::Job::Delegate* delegate,
179 HttpStreamFactoryImpl::JobType job_type, 167 HttpStreamFactoryImpl::JobType job_type,
180 HttpNetworkSession* session, 168 HttpNetworkSession* session,
181 const HttpRequestInfo& request_info, 169 const HttpRequestInfo& request_info,
182 RequestPriority priority, 170 RequestPriority priority,
183 const ProxyInfo& proxy_info, 171 const ProxyInfo& proxy_info,
(...skipping 18 matching lines...) Expand all
202 private: 190 private:
203 MockHttpStreamFactoryImplJob* main_job_; 191 MockHttpStreamFactoryImplJob* main_job_;
204 MockHttpStreamFactoryImplJob* alternative_job_; 192 MockHttpStreamFactoryImplJob* alternative_job_;
205 bool override_main_job_url_; 193 bool override_main_job_url_;
206 GURL main_job_alternative_url_; 194 GURL main_job_alternative_url_;
207 }; 195 };
208 196
209 } // namespace net 197 } // namespace net
210 198
211 #endif // NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ 199 #endif // NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller.cc ('k') | net/http/http_stream_factory_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698