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

Unified Diff: net/http/transport_security_state_static.template

Issue 2906633003: Add a build flag to configure bundling of HSTS preload list (Closed)
Patch Set: address sleevi comments Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: net/http/transport_security_state_static.template
diff --git a/net/http/transport_security_state_static.template b/net/http/transport_security_state_static.template
index fd73c127835cb4e80d131064253750ed30400dbb..f956cb8e1e019ddc33caa54e1a4d53cc82b713d8 100644
--- a/net/http/transport_security_state_static.template
+++ b/net/http/transport_security_state_static.template
@@ -11,6 +11,11 @@
#include "net/http/transport_security_state_source.h"
+// kNoReportURI is a placeholder for when a pinset does not have a report URI.
+static const char kNoReportURI[] = "";
+
+#if BUILDFLAG(INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST)
+
// These are SubjectPublicKeyInfo hashes for public key pinning. The
// hashes are SHA256 digests.
[[SPKI_HASHES]]
@@ -24,9 +29,6 @@ static const char* const kNoRejectedPublicKeys[] = {
nullptr,
};
-// kNoReportURI is a placeholder for when a pinset does not have a report URI.
-static const char kNoReportURI[] = "";
-
[[ACCEPTABLE_CERTS]]
static const net::TransportSecurityStateSource::Pinset kPinsets[] = [[PINSETS]];
@@ -55,4 +57,18 @@ static const net::TransportSecurityStateSource kHSTSSource = {
arraysize(kPinsets)
};
+#else
+static const net::TransportSecurityStateSource kHSTSSource = {
+ nullptr,
+ 0,
+ nullptr,
+ 0,
+ 0,
+ nullptr,
+ nullptr,
+ nullptr,
+ 0
+};
+#endif // BUILDFLAG(INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST)
+
#endif // NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_

Powered by Google App Engine
This is Rietveld 408576698