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

Side by Side Diff: components/cronet/url_request_context_config_unittest.cc

Issue 2052363002: Enable public key pinning of local trust anchors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed CronetPerfTestActivity test Created 4 years, 5 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
« no previous file with comments | « components/cronet/url_request_context_config.cc ('k') | net/http/transport_security_state.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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,
63 // Enable Public Key Pinning bypass for local trust anchors.
64 true);
63 65
64 net::URLRequestContextBuilder builder; 66 net::URLRequestContextBuilder builder;
65 net::NetLog net_log; 67 net::NetLog net_log;
66 config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr); 68 config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr);
67 // Set a ProxyConfigService to avoid DCHECK failure when building. 69 // Set a ProxyConfigService to avoid DCHECK failure when building.
68 builder.set_proxy_config_service(base::WrapUnique( 70 builder.set_proxy_config_service(base::WrapUnique(
69 new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect()))); 71 new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect())));
70 std::unique_ptr<net::URLRequestContext> context(builder.Build()); 72 std::unique_ptr<net::URLRequestContext> context(builder.Build());
71 const net::HttpNetworkSession::Params* params = 73 const net::HttpNetworkSession::Params* params =
72 context->GetNetworkSessionParams(); 74 context->GetNetworkSessionParams();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 "", 133 "",
132 // Data reduction proxy. 134 // Data reduction proxy.
133 "", 135 "",
134 // Fallback data reduction proxy. 136 // Fallback data reduction proxy.
135 "", 137 "",
136 // Data reduction proxy secure proxy check URL. 138 // Data reduction proxy secure proxy check URL.
137 "", 139 "",
138 // MockCertVerifier to use for testing purposes. 140 // MockCertVerifier to use for testing purposes.
139 std::unique_ptr<net::CertVerifier>(), 141 std::unique_ptr<net::CertVerifier>(),
140 // Enable network quality estimator. 142 // Enable network quality estimator.
141 false); 143 false,
144 // Enable Public Key Pinning bypass for local trust anchors.
145 true);
142 146
143 net::URLRequestContextBuilder builder; 147 net::URLRequestContextBuilder builder;
144 net::NetLog net_log; 148 net::NetLog net_log;
145 config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr); 149 config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr);
146 // Set a ProxyConfigService to avoid DCHECK failure when building. 150 // Set a ProxyConfigService to avoid DCHECK failure when building.
147 builder.set_proxy_config_service(base::WrapUnique( 151 builder.set_proxy_config_service(base::WrapUnique(
148 new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect()))); 152 new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect())));
149 std::unique_ptr<net::URLRequestContext> context(builder.Build()); 153 std::unique_ptr<net::URLRequestContext> context(builder.Build());
150 const net::HttpNetworkSession::Params* params = 154 const net::HttpNetworkSession::Params* params =
151 context->GetNetworkSessionParams(); 155 context->GetNetworkSessionParams();
152 156
153 EXPECT_FALSE(params->quic_close_sessions_on_ip_change); 157 EXPECT_FALSE(params->quic_close_sessions_on_ip_change);
154 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change); 158 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change);
155 EXPECT_TRUE(params->quic_migrate_sessions_early); 159 EXPECT_TRUE(params->quic_migrate_sessions_early);
156 } 160 }
157 161
158 } // namespace cronet 162 } // namespace cronet
OLDNEW
« no previous file with comments | « components/cronet/url_request_context_config.cc ('k') | net/http/transport_security_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698