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

Side by Side Diff: components/cronet/url_request_context_config.h

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, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ 5 #ifndef COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_
6 #define COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ 6 #define COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/json/json_value_converter.h" 10 #include "base/json/json_value_converter.h"
(...skipping 23 matching lines...) Expand all
34 std::string host; 34 std::string host;
35 // Port of the server that supports QUIC. 35 // Port of the server that supports QUIC.
36 int port; 36 int port;
37 // Alternate protocol port. 37 // Alternate protocol port.
38 int alternate_port; 38 int alternate_port;
39 39
40 private: 40 private:
41 DISALLOW_COPY_AND_ASSIGN(QuicHint); 41 DISALLOW_COPY_AND_ASSIGN(QuicHint);
42 }; 42 };
43 43
44 // Public-Key-Pinning configuration structure.
45 struct Hpkp {
46 Hpkp(){};
47 ~Hpkp(){};
48
49 // Register |converter| for use in converter.Convert().
50 static void RegisterJSONConverter(
51 base::JSONValueConverter<Hpkp>* converter);
52
53 // Name of the pinned host.
mef 2015/11/02 17:56:56 nit: Host name.
kapishnikov 2015/11/02 22:45:49 Done.
54 std::string host;
55 // Pin hashes (currently SHA256 only).
56 ScopedVector<std::string> pin_hashes;
57 // Indicates whether the pinning should apply to the pinned host subdomains.
58 bool include_subdomains;
59
60 private:
61 DISALLOW_COPY_AND_ASSIGN(Hpkp);
62 };
63
44 URLRequestContextConfig(); 64 URLRequestContextConfig();
45 ~URLRequestContextConfig(); 65 ~URLRequestContextConfig();
46 66
47 // Load config values from JSON format. 67 // Load config values from JSON format.
48 bool LoadFromJSON(const std::string& config_string); 68 bool LoadFromJSON(const std::string& config_string);
49 69
50 // Configure |context_builder| based on |this|. 70 // Configure |context_builder| based on |this|.
51 void ConfigureURLRequestContextBuilder( 71 void ConfigureURLRequestContextBuilder(
52 net::URLRequestContextBuilder* context_builder); 72 net::URLRequestContextBuilder* context_builder);
53 73
(...skipping 21 matching lines...) Expand all
75 std::string user_agent; 95 std::string user_agent;
76 // App-provided list of servers that support QUIC. 96 // App-provided list of servers that support QUIC.
77 ScopedVector<QuicHint> quic_hints; 97 ScopedVector<QuicHint> quic_hints;
78 // Comma-separted list of QUIC connection options. 98 // Comma-separted list of QUIC connection options.
79 std::string quic_connection_options; 99 std::string quic_connection_options;
80 // Enable Data Reduction Proxy with authentication key. 100 // Enable Data Reduction Proxy with authentication key.
81 std::string data_reduction_proxy_key; 101 std::string data_reduction_proxy_key;
82 std::string data_reduction_primary_proxy; 102 std::string data_reduction_primary_proxy;
83 std::string data_reduction_fallback_proxy; 103 std::string data_reduction_fallback_proxy;
84 std::string data_reduction_secure_proxy_check_url; 104 std::string data_reduction_secure_proxy_check_url;
105 // The list of host pinning-s
mef 2015/11/02 17:56:56 -s? End in period.
kapishnikov 2015/11/02 22:45:49 Done.
106 ScopedVector<Hpkp> hpkp_list;
85 107
86 // Certificate verifier for testing. 108 // Certificate verifier for testing.
87 scoped_ptr<net::CertVerifier> mock_cert_verifier; 109 scoped_ptr<net::CertVerifier> mock_cert_verifier;
88 110
89 private: 111 private:
90 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfig); 112 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfig);
91 }; 113 };
92 114
93 } // namespace cronet 115 } // namespace cronet
94 116
95 #endif // COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ 117 #endif // COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698