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

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

Issue 1941083002: JobController 1: Adding a new class HttpStreamFactoryImpl::JobController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add JobFactory and rewrite test cases Created 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "net/http/http_stream_factory_test_util.h"
6
7 #include "net/proxy/proxy_info.h"
8
9 namespace net {
10 TestHttpStreamRequestDelegate::TestHttpStreamRequestDelegate() {}
11
12 TestHttpStreamRequestDelegate::~TestHttpStreamRequestDelegate() {}
13
14 TestJobFactory::TestJobFactory()
15 : main_job_(nullptr), alternative_job_(nullptr) {}
16
17 TestJobFactory::~TestJobFactory() {}
18
19 HttpStreamFactoryImpl::Job* TestJobFactory::CreateJob(
20 HttpStreamFactoryImpl::Job::Delegate* delegate,
21 HttpStreamFactoryImpl::JobType job_type,
22 HttpNetworkSession* session,
23 const HttpRequestInfo& request_info,
24 RequestPriority priority,
25 const SSLConfig& server_ssl_config,
26 const SSLConfig& proxy_ssl_config,
27 HostPortPair destination,
28 GURL origin_url,
29 NetLog* net_log) {
30 return main_job_.release();
31 }
32
33 HttpStreamFactoryImpl::Job* TestJobFactory::CreateJob(
34 HttpStreamFactoryImpl::Job::Delegate* delegate,
35 HttpStreamFactoryImpl::JobType job_type,
36 HttpNetworkSession* session,
37 const HttpRequestInfo& request_info,
38 RequestPriority priority,
39 const SSLConfig& server_ssl_config,
40 const SSLConfig& proxy_ssl_config,
41 HostPortPair destination,
42 GURL origin_url,
43 AlternativeService alternative_service,
44 NetLog* net_log) {
45 return alternative_job_.release();
46 }
47
48 TestHttpStreamFactoryImplJob::TestHttpStreamFactoryImplJob(
49 HttpStreamFactoryImpl::Job::Delegate* delegate,
50 HttpStreamFactoryImpl::JobType job_type,
51 HttpNetworkSession* session,
52 const HttpRequestInfo& request_info,
53 RequestPriority priority,
54 const SSLConfig& server_ssl_config,
55 const SSLConfig& proxy_ssl_config,
56 HostPortPair destination,
57 GURL origin_url,
58 NetLog* net_log)
59 : HttpStreamFactoryImpl::Job(delegate,
60 job_type,
61 session,
62 request_info,
63 priority,
64 server_ssl_config,
65 proxy_ssl_config,
66 destination,
67 origin_url,
68 net_log) {}
69
70 TestHttpStreamFactoryImplJob::TestHttpStreamFactoryImplJob(
71 HttpStreamFactoryImpl::Job::Delegate* delegate,
72 HttpStreamFactoryImpl::JobType job_type,
73 HttpNetworkSession* session,
74 const HttpRequestInfo& request_info,
75 RequestPriority priority,
76 const SSLConfig& server_ssl_config,
77 const SSLConfig& proxy_ssl_config,
78 HostPortPair destination,
79 GURL origin_url,
80 AlternativeService alternative_service,
81 NetLog* net_log)
82 : HttpStreamFactoryImpl::Job(delegate,
83 job_type,
84 session,
85 request_info,
86 priority,
87 server_ssl_config,
88 proxy_ssl_config,
89 destination,
90 origin_url,
91 alternative_service,
92 net_log) {}
93
94 TestHttpStreamFactoryImplJob::~TestHttpStreamFactoryImplJob() {}
95
96 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698