Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/cronet/url_request_context_config.h" | 5 #include "components/cronet/url_request_context_config.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "net/cert/cert_verifier.h" | 9 #include "net/cert/cert_verifier.h" |
| 10 #include "net/http/http_network_session.h" | 10 #include "net/http/http_network_session.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 "", | 52 "", |
| 53 // Data reduction proxy. | 53 // Data reduction proxy. |
| 54 "", | 54 "", |
| 55 // Fallback data reduction proxy. | 55 // Fallback data reduction proxy. |
| 56 "", | 56 "", |
| 57 // Data reduction proxy secure proxy check URL. | 57 // Data reduction proxy secure proxy check URL. |
| 58 "", | 58 "", |
| 59 // MockCertVerifier to use for testing purposes. | 59 // MockCertVerifier to use for testing purposes. |
| 60 std::unique_ptr<net::CertVerifier>(), | 60 std::unique_ptr<net::CertVerifier>(), |
| 61 // Enable network quality estimator. | 61 // Enable network quality estimator. |
| 62 false); | 62 false, true); |
|
Ryan Sleevi
2016/07/01 01:17:24
Update documentation (see preceding lines)
kapishnikov
2016/07/01 17:20:54
Done.
| |
| 63 | 63 |
| 64 net::URLRequestContextBuilder builder; | 64 net::URLRequestContextBuilder builder; |
| 65 net::NetLog net_log; | 65 net::NetLog net_log; |
| 66 config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr); | 66 config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr); |
| 67 // Set a ProxyConfigService to avoid DCHECK failure when building. | 67 // Set a ProxyConfigService to avoid DCHECK failure when building. |
| 68 builder.set_proxy_config_service(base::WrapUnique( | 68 builder.set_proxy_config_service(base::WrapUnique( |
| 69 new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect()))); | 69 new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect()))); |
| 70 std::unique_ptr<net::URLRequestContext> context(builder.Build()); | 70 std::unique_ptr<net::URLRequestContext> context(builder.Build()); |
| 71 const net::HttpNetworkSession::Params* params = | 71 const net::HttpNetworkSession::Params* params = |
| 72 context->GetNetworkSessionParams(); | 72 context->GetNetworkSessionParams(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 "", | 131 "", |
| 132 // Data reduction proxy. | 132 // Data reduction proxy. |
| 133 "", | 133 "", |
| 134 // Fallback data reduction proxy. | 134 // Fallback data reduction proxy. |
| 135 "", | 135 "", |
| 136 // Data reduction proxy secure proxy check URL. | 136 // Data reduction proxy secure proxy check URL. |
| 137 "", | 137 "", |
| 138 // MockCertVerifier to use for testing purposes. | 138 // MockCertVerifier to use for testing purposes. |
| 139 std::unique_ptr<net::CertVerifier>(), | 139 std::unique_ptr<net::CertVerifier>(), |
| 140 // Enable network quality estimator. | 140 // Enable network quality estimator. |
| 141 false); | 141 false, true); |
|
Ryan Sleevi
2016/07/01 01:17:24
Update documentation (see preceding lines)
kapishnikov
2016/07/01 17:20:54
Done.
| |
| 142 | 142 |
| 143 net::URLRequestContextBuilder builder; | 143 net::URLRequestContextBuilder builder; |
| 144 net::NetLog net_log; | 144 net::NetLog net_log; |
| 145 config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr); | 145 config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr); |
| 146 // Set a ProxyConfigService to avoid DCHECK failure when building. | 146 // Set a ProxyConfigService to avoid DCHECK failure when building. |
| 147 builder.set_proxy_config_service(base::WrapUnique( | 147 builder.set_proxy_config_service(base::WrapUnique( |
| 148 new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect()))); | 148 new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect()))); |
| 149 std::unique_ptr<net::URLRequestContext> context(builder.Build()); | 149 std::unique_ptr<net::URLRequestContext> context(builder.Build()); |
| 150 const net::HttpNetworkSession::Params* params = | 150 const net::HttpNetworkSession::Params* params = |
| 151 context->GetNetworkSessionParams(); | 151 context->GetNetworkSessionParams(); |
| 152 | 152 |
| 153 EXPECT_FALSE(params->quic_close_sessions_on_ip_change); | 153 EXPECT_FALSE(params->quic_close_sessions_on_ip_change); |
| 154 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change); | 154 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change); |
| 155 EXPECT_TRUE(params->quic_migrate_sessions_early); | 155 EXPECT_TRUE(params->quic_migrate_sessions_early); |
| 156 } | 156 } |
| 157 | 157 |
| 158 } // namespace cronet | 158 } // namespace cronet |
| OLD | NEW |