| Index: components/cronet/url_request_context_config.h
|
| diff --git a/components/cronet/url_request_context_config.h b/components/cronet/url_request_context_config.h
|
| index 7389811a88355e8ce6e5eaed8d5a30fa78b2fe43..60a41ae277b8222ea786bdd398f6acce5d644052 100644
|
| --- a/components/cronet/url_request_context_config.h
|
| +++ b/components/cronet/url_request_context_config.h
|
| @@ -10,6 +10,7 @@
|
| #include "base/json/json_value_converter.h"
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_vector.h"
|
| +#include "base/time/time.h"
|
|
|
| namespace net {
|
| class CertVerifier;
|
| @@ -41,6 +42,28 @@ struct URLRequestContextConfig {
|
| DISALLOW_COPY_AND_ASSIGN(QuicHint);
|
| };
|
|
|
| + // Public-Key-Pinning configuration structure.
|
| + struct Hpkp {
|
| + Hpkp() {}
|
| + ~Hpkp() {}
|
| +
|
| + // Register |converter| for use in converter.Convert().
|
| + static void RegisterJSONConverter(
|
| + base::JSONValueConverter<Hpkp>* converter);
|
| +
|
| + // Host name.
|
| + std::string host;
|
| + // Pin hashes (currently SHA256 only).
|
| + ScopedVector<std::string> pin_hashes;
|
| + // Indicates whether the pinning should apply to the pinned host subdomains.
|
| + bool include_subdomains;
|
| + // Expiration date for the pins.
|
| + base::Time expiration_date;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(Hpkp);
|
| + };
|
| +
|
| URLRequestContextConfig();
|
| ~URLRequestContextConfig();
|
|
|
| @@ -82,6 +105,8 @@ struct URLRequestContextConfig {
|
| std::string data_reduction_primary_proxy;
|
| std::string data_reduction_fallback_proxy;
|
| std::string data_reduction_secure_proxy_check_url;
|
| + // The list of public key pins.
|
| + ScopedVector<Hpkp> hpkp_list;
|
|
|
| // Certificate verifier for testing.
|
| scoped_ptr<net::CertVerifier> mock_cert_verifier;
|
|
|