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

Side by Side Diff: net/spdy/spdy_test_util_common.cc

Issue 1888963004: Add HttpProtocolHandler and convert everything to use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-supports-scheme
Patch Set: rebase (needs fixing) Created 4 years, 2 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "net/spdy/spdy_test_util_common.h" 5 #include "net/spdy/spdy_test_util_common.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <utility> 10 #include <utility>
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 storage_.set_proxy_service(ProxyService::CreateDirect()); 452 storage_.set_proxy_service(ProxyService::CreateDirect());
453 storage_.set_ct_policy_enforcer( 453 storage_.set_ct_policy_enforcer(
454 base::WrapUnique(new AllowAnyCertCTPolicyEnforcer())); 454 base::WrapUnique(new AllowAnyCertCTPolicyEnforcer()));
455 storage_.set_cert_transparency_verifier( 455 storage_.set_cert_transparency_verifier(
456 base::WrapUnique(new IgnoresCTVerifier())); 456 base::WrapUnique(new IgnoresCTVerifier()));
457 storage_.set_ssl_config_service(new SSLConfigServiceDefaults); 457 storage_.set_ssl_config_service(new SSLConfigServiceDefaults);
458 storage_.set_http_auth_handler_factory( 458 storage_.set_http_auth_handler_factory(
459 HttpAuthHandlerFactory::CreateDefault(host_resolver())); 459 HttpAuthHandlerFactory::CreateDefault(host_resolver()));
460 storage_.set_http_server_properties( 460 storage_.set_http_server_properties(
461 std::unique_ptr<HttpServerProperties>(new HttpServerPropertiesImpl())); 461 std::unique_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
462 storage_.set_job_factory(base::MakeUnique<URLRequestJobFactoryImpl>()); 462 storage_.set_job_factory(
463 URLRequestJobFactoryImpl::CreateWithHttpProtocolHandlers());
463 HttpNetworkSession::Params params; 464 HttpNetworkSession::Params params;
464 params.client_socket_factory = &socket_factory_; 465 params.client_socket_factory = &socket_factory_;
465 params.host_resolver = host_resolver(); 466 params.host_resolver = host_resolver();
466 params.cert_verifier = cert_verifier(); 467 params.cert_verifier = cert_verifier();
467 params.transport_security_state = transport_security_state(); 468 params.transport_security_state = transport_security_state();
468 params.proxy_service = proxy_service(); 469 params.proxy_service = proxy_service();
469 params.ct_policy_enforcer = ct_policy_enforcer(); 470 params.ct_policy_enforcer = ct_policy_enforcer();
470 params.cert_transparency_verifier = cert_transparency_verifier(); 471 params.cert_transparency_verifier = cert_transparency_verifier();
471 params.ssl_config_service = ssl_config_service(); 472 params.ssl_config_service = ssl_config_service();
472 params.http_auth_handler_factory = http_auth_handler_factory(); 473 params.http_auth_handler_factory = http_auth_handler_factory();
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 headers[GetSchemeKey()] = scheme.c_str(); 1142 headers[GetSchemeKey()] = scheme.c_str();
1142 headers[GetPathKey()] = path.c_str(); 1143 headers[GetPathKey()] = path.c_str();
1143 if (content_length) { 1144 if (content_length) {
1144 std::string length_str = base::Int64ToString(*content_length); 1145 std::string length_str = base::Int64ToString(*content_length);
1145 headers["content-length"] = length_str; 1146 headers["content-length"] = length_str;
1146 } 1147 }
1147 return headers; 1148 return headers;
1148 } 1149 }
1149 1150
1150 } // namespace net 1151 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_script_fetcher_impl_unittest.cc ('k') | net/url_request/http_protocol_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698