| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_spdy3.h" | 5 #include "net/spdy/spdy_test_util_spdy3.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "net/base/mock_cert_verifier.h" | 13 #include "net/base/mock_cert_verifier.h" |
| 14 #include "net/http/http_network_session.h" | 14 #include "net/http/http_network_session.h" |
| 15 #include "net/http/http_network_transaction.h" | 15 #include "net/http/http_network_transaction.h" |
| 16 #include "net/http/http_server_properties_impl.h" | 16 #include "net/http/http_server_properties_impl.h" |
| 17 #include "net/spdy/buffered_spdy_framer.h" | 17 #include "net/spdy/buffered_spdy_framer.h" |
| 18 #include "net/spdy/spdy_http_utils.h" | 18 #include "net/spdy/spdy_http_utils.h" |
| 19 #include "net/spdy/spdy_session.h" | 19 #include "net/spdy/spdy_session.h" |
| 20 #include "net/url_request/url_request_throttler_manager.h" |
| 20 | 21 |
| 21 namespace net { | 22 namespace net { |
| 22 | 23 |
| 23 namespace test_spdy3 { | 24 namespace test_spdy3 { |
| 24 | 25 |
| 25 namespace { | 26 namespace { |
| 26 | 27 |
| 27 // Parses a URL into the scheme, host, and path components required for a | 28 // Parses a URL into the scheme, host, and path components required for a |
| 28 // SPDY request. | 29 // SPDY request. |
| 29 void ParseUrl(const char* const url, std::string* scheme, std::string* host, | 30 void ParseUrl(const char* const url, std::string* scheme, std::string* host, |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 | 944 |
| 944 SpdyURLRequestContext::SpdyURLRequestContext() | 945 SpdyURLRequestContext::SpdyURLRequestContext() |
| 945 : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { | 946 : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { |
| 946 storage_.set_host_resolver(new MockHostResolver()); | 947 storage_.set_host_resolver(new MockHostResolver()); |
| 947 storage_.set_cert_verifier(new MockCertVerifier); | 948 storage_.set_cert_verifier(new MockCertVerifier); |
| 948 storage_.set_proxy_service(ProxyService::CreateDirect()); | 949 storage_.set_proxy_service(ProxyService::CreateDirect()); |
| 949 storage_.set_ssl_config_service(new SSLConfigServiceDefaults); | 950 storage_.set_ssl_config_service(new SSLConfigServiceDefaults); |
| 950 storage_.set_http_auth_handler_factory(HttpAuthHandlerFactory::CreateDefault( | 951 storage_.set_http_auth_handler_factory(HttpAuthHandlerFactory::CreateDefault( |
| 951 host_resolver())); | 952 host_resolver())); |
| 952 storage_.set_http_server_properties(new HttpServerPropertiesImpl); | 953 storage_.set_http_server_properties(new HttpServerPropertiesImpl); |
| 954 storage_.set_throttler_manager(new URLRequestThrottlerManager); |
| 953 net::HttpNetworkSession::Params params; | 955 net::HttpNetworkSession::Params params; |
| 954 params.client_socket_factory = &socket_factory_; | 956 params.client_socket_factory = &socket_factory_; |
| 955 params.host_resolver = host_resolver(); | 957 params.host_resolver = host_resolver(); |
| 956 params.cert_verifier = cert_verifier(); | 958 params.cert_verifier = cert_verifier(); |
| 957 params.proxy_service = proxy_service(); | 959 params.proxy_service = proxy_service(); |
| 958 params.ssl_config_service = ssl_config_service(); | 960 params.ssl_config_service = ssl_config_service(); |
| 959 params.http_auth_handler_factory = http_auth_handler_factory(); | 961 params.http_auth_handler_factory = http_auth_handler_factory(); |
| 960 params.network_delegate = network_delegate(); | 962 params.network_delegate = network_delegate(); |
| 961 params.http_server_properties = http_server_properties(); | 963 params.http_server_properties = http_server_properties(); |
| 962 scoped_refptr<HttpNetworkSession> network_session( | 964 scoped_refptr<HttpNetworkSession> network_session( |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 | 998 |
| 997 SpdyTestStateHelper::~SpdyTestStateHelper() { | 999 SpdyTestStateHelper::~SpdyTestStateHelper() { |
| 998 SpdySession::ResetStaticSettingsToInit(); | 1000 SpdySession::ResetStaticSettingsToInit(); |
| 999 // TODO(rch): save/restore this value | 1001 // TODO(rch): save/restore this value |
| 1000 BufferedSpdyFramer::set_enable_compression_default(true); | 1002 BufferedSpdyFramer::set_enable_compression_default(true); |
| 1001 } | 1003 } |
| 1002 | 1004 |
| 1003 } // namespace test_spdy3 | 1005 } // namespace test_spdy3 |
| 1004 | 1006 |
| 1005 } // namespace net | 1007 } // namespace net |
| OLD | NEW |