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

Side by Side Diff: net/http/transport_security_state.cc

Issue 2906633003: Add a build flag to configure bundling of HSTS preload list (Closed)
Patch Set: self (one typo) Created 3 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
OLDNEW
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/http/transport_security_state.h" 5 #include "net/http/transport_security_state.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 hostname_offset--; 632 hostname_offset--;
633 break; 633 break;
634 } 634 }
635 } 635 }
636 } 636 }
637 } 637 }
638 638
639 bool DecodeHSTSPreload(const std::string& hostname, PreloadResult* out) { 639 bool DecodeHSTSPreload(const std::string& hostname, PreloadResult* out) {
640 bool found; 640 bool found;
641 if (!DecodeHSTSPreloadRaw(hostname, &found, out)) { 641 if (!DecodeHSTSPreloadRaw(hostname, &found, out)) {
642 DCHECK(false) << "Internal error in DecodeHSTSPreloadRaw for hostname " 642 // This can happen when INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST is
643 << hostname; 643 // false, in which case BitReader.seek(0) will return false.
Ryan Sleevi 2017/07/07 16:45:13 Could you explain the rationale for doing this cha
xunjieli 2017/07/10 22:20:40 Done. That's very neat. Thank you for the suggesti
644 return false; 644 return false;
645 } 645 }
646 646
647 return found; 647 return found;
648 } 648 }
649 649
650 // Serializes an OCSPVerifyResult::ResponseStatus to a string enum, suitable for 650 // Serializes an OCSPVerifyResult::ResponseStatus to a string enum, suitable for
651 // the |response-status| field in an Expect-Staple report. 651 // the |response-status| field in an Expect-Staple report.
652 std::string SerializeExpectStapleResponseStatus( 652 std::string SerializeExpectStapleResponseStatus(
653 OCSPVerifyResult::ResponseStatus status) { 653 OCSPVerifyResult::ResponseStatus status) {
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1845 TransportSecurityState::PKPStateIterator::PKPStateIterator( 1845 TransportSecurityState::PKPStateIterator::PKPStateIterator(
1846 const TransportSecurityState& state) 1846 const TransportSecurityState& state)
1847 : iterator_(state.enabled_pkp_hosts_.begin()), 1847 : iterator_(state.enabled_pkp_hosts_.begin()),
1848 end_(state.enabled_pkp_hosts_.end()) { 1848 end_(state.enabled_pkp_hosts_.end()) {
1849 } 1849 }
1850 1850
1851 TransportSecurityState::PKPStateIterator::~PKPStateIterator() { 1851 TransportSecurityState::PKPStateIterator::~PKPStateIterator() {
1852 } 1852 }
1853 1853
1854 } // namespace net 1854 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698