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

Unified Diff: components/cronet/url_request_context_config.cc

Issue 1407263010: [Cronet] Public key pinning for Java API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small javadoc fix Created 5 years, 2 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: components/cronet/url_request_context_config.cc
diff --git a/components/cronet/url_request_context_config.cc b/components/cronet/url_request_context_config.cc
index 00a79777ecea6c2a87f4899acf762870d8dd728c..f49ee82f2bbafd59b0d99aa4c4fb6496b95b9341 100644
--- a/components/cronet/url_request_context_config.cc
+++ b/components/cronet/url_request_context_config.cc
@@ -56,6 +56,18 @@ void URLRequestContextConfig::QuicHint::RegisterJSONConverter(
&URLRequestContextConfig::QuicHint::alternate_port);
}
+// static
+void URLRequestContextConfig::Hpkp::RegisterJSONConverter(
+ base::JSONValueConverter<URLRequestContextConfig::Hpkp>* converter) {
+ converter->RegisterStringField(REQUEST_CONTEXT_CONFIG_HPKP_HOST,
+ &URLRequestContextConfig::Hpkp::host);
+ converter->RegisterRepeatedString(REQUEST_CONTEXT_CONFIG_HPKP_PIN_HASHES,
+ &URLRequestContextConfig::Hpkp::pin_hashes);
+ converter->RegisterBoolField(
+ REQUEST_CONTEXT_CONFIG_HPKP_INCLUDE_SUBDOMAINS,
+ &URLRequestContextConfig::Hpkp::include_subdomains);
+}
+
URLRequestContextConfig::URLRequestContextConfig() {}
URLRequestContextConfig::~URLRequestContextConfig() {
@@ -140,6 +152,8 @@ void URLRequestContextConfig::RegisterJSONConverter(
converter->RegisterStringField(
REQUEST_CONTEXT_CONFIG_DATA_REDUCTION_PROXY_KEY,
&URLRequestContextConfig::data_reduction_proxy_key);
+ converter->RegisterRepeatedMessage(REQUEST_CONTEXT_CONFIG_HPKP_LIST,
+ &URLRequestContextConfig::hpkp_list);
// For Testing.
converter->RegisterCustomField<scoped_ptr<net::CertVerifier>>(

Powered by Google App Engine
This is Rietveld 408576698