OLD | NEW |
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/chromium/spdy_test_util_common.h" | 5 #include "net/spdy/chromium/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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 public: | 434 public: |
435 AllowAnyCertCTPolicyEnforcer() {} | 435 AllowAnyCertCTPolicyEnforcer() {} |
436 ~AllowAnyCertCTPolicyEnforcer() override = default; | 436 ~AllowAnyCertCTPolicyEnforcer() override = default; |
437 | 437 |
438 ct::CertPolicyCompliance DoesConformToCertPolicy( | 438 ct::CertPolicyCompliance DoesConformToCertPolicy( |
439 X509Certificate* cert, | 439 X509Certificate* cert, |
440 const SCTList& verified_scts, | 440 const SCTList& verified_scts, |
441 const NetLogWithSource& net_log) override { | 441 const NetLogWithSource& net_log) override { |
442 return ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS; | 442 return ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS; |
443 } | 443 } |
444 | |
445 ct::EVPolicyCompliance DoesConformToCTEVPolicy( | |
446 X509Certificate* cert, | |
447 const ct::EVCertsWhitelist* ev_whitelist, | |
448 const SCTList& verified_scts, | |
449 const NetLogWithSource& net_log) override { | |
450 return ct::EVPolicyCompliance::EV_POLICY_COMPLIES_VIA_SCTS; | |
451 } | |
452 }; | 444 }; |
453 | 445 |
454 SpdyURLRequestContext::SpdyURLRequestContext() : storage_(this) { | 446 SpdyURLRequestContext::SpdyURLRequestContext() : storage_(this) { |
455 storage_.set_host_resolver( | 447 storage_.set_host_resolver( |
456 std::unique_ptr<HostResolver>(new MockHostResolver)); | 448 std::unique_ptr<HostResolver>(new MockHostResolver)); |
457 storage_.set_cert_verifier(base::WrapUnique(new MockCertVerifier)); | 449 storage_.set_cert_verifier(base::WrapUnique(new MockCertVerifier)); |
458 storage_.set_transport_security_state( | 450 storage_.set_transport_security_state( |
459 base::WrapUnique(new TransportSecurityState)); | 451 base::WrapUnique(new TransportSecurityState)); |
460 storage_.set_proxy_service(ProxyService::CreateDirect()); | 452 storage_.set_proxy_service(ProxyService::CreateDirect()); |
461 storage_.set_ct_policy_enforcer( | 453 storage_.set_ct_policy_enforcer( |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1159 headers[GetSchemeKey()] = scheme.c_str(); | 1151 headers[GetSchemeKey()] = scheme.c_str(); |
1160 headers[GetPathKey()] = path.c_str(); | 1152 headers[GetPathKey()] = path.c_str(); |
1161 if (content_length) { | 1153 if (content_length) { |
1162 SpdyString length_str = base::Int64ToString(*content_length); | 1154 SpdyString length_str = base::Int64ToString(*content_length); |
1163 headers["content-length"] = length_str; | 1155 headers["content-length"] = length_str; |
1164 } | 1156 } |
1165 return headers; | 1157 return headers; |
1166 } | 1158 } |
1167 | 1159 |
1168 } // namespace net | 1160 } // namespace net |
OLD | NEW |