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

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

Issue 2738813004: [Cronet] Write effective experimental options to NetLog (Closed)
Patch Set: Fix use-after-free bug Created 3 years, 9 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 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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_vector.h" 13 #include "base/memory/scoped_vector.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "net/base/hash_value.h" 15 #include "net/base/hash_value.h"
16 #include "net/cert/cert_verifier.h" 16 #include "net/cert/cert_verifier.h"
17 17
18 namespace base { 18 namespace base {
19 class DictionaryValue;
19 class SequencedTaskRunner; 20 class SequencedTaskRunner;
20 } // namespace base 21 } // namespace base
21 22
22 namespace net { 23 namespace net {
23 class CertVerifier; 24 class CertVerifier;
24 class NetLog; 25 class NetLog;
25 class URLRequestContextBuilder; 26 class URLRequestContextBuilder;
26 } // namespace net 27 } // namespace net
27 28
28 namespace cronet { 29 namespace cronet {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // MockCertVerifier to use for testing purposes. 111 // MockCertVerifier to use for testing purposes.
111 std::unique_ptr<net::CertVerifier> mock_cert_verifier, 112 std::unique_ptr<net::CertVerifier> mock_cert_verifier,
112 // Enable network quality estimator. 113 // Enable network quality estimator.
113 bool enable_network_quality_estimator, 114 bool enable_network_quality_estimator,
114 // Enable bypassing of public key pinning for local trust anchors 115 // Enable bypassing of public key pinning for local trust anchors
115 bool bypass_public_key_pinning_for_local_trust_anchors, 116 bool bypass_public_key_pinning_for_local_trust_anchors,
116 // Certificate verifier cache data. 117 // Certificate verifier cache data.
117 const std::string& cert_verifier_data); 118 const std::string& cert_verifier_data);
118 ~URLRequestContextConfig(); 119 ~URLRequestContextConfig();
119 120
120 // Configure |context_builder| based on |this|. 121 // Configures |context_builder| based on |this|.
121 void ConfigureURLRequestContextBuilder( 122 void ConfigureURLRequestContextBuilder(
122 net::URLRequestContextBuilder* context_builder, 123 net::URLRequestContextBuilder* context_builder,
123 net::NetLog* net_log, 124 net::NetLog* net_log,
124 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner); 125 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner);
125 126
126 // Enable QUIC. 127 // Enable QUIC.
127 const bool enable_quic; 128 const bool enable_quic;
128 // QUIC User Agent ID. 129 // QUIC User Agent ID.
129 const std::string quic_user_agent_id; 130 const std::string quic_user_agent_id;
130 // Enable SPDY. 131 // Enable SPDY.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 167
167 // Data to populte CertVerifierCache. 168 // Data to populte CertVerifierCache.
168 const std::string cert_verifier_data; 169 const std::string cert_verifier_data;
169 170
170 // App-provided list of servers that support QUIC. 171 // App-provided list of servers that support QUIC.
171 ScopedVector<QuicHint> quic_hints; 172 ScopedVector<QuicHint> quic_hints;
172 173
173 // The list of public key pins. 174 // The list of public key pins.
174 ScopedVector<Pkp> pkp_list; 175 ScopedVector<Pkp> pkp_list;
175 176
177 // Experimental options that are recognized by the config parser.
178 std::unique_ptr<base::DictionaryValue> effective_experimental_options;
179
176 private: 180 private:
177 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfig); 181 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfig);
178 }; 182 };
179 183
180 // Stores intermediate state for URLRequestContextConfig. Initializes with 184 // Stores intermediate state for URLRequestContextConfig. Initializes with
181 // (mostly) sane defaults, then the appropriate member variables can be 185 // (mostly) sane defaults, then the appropriate member variables can be
182 // modified, and it can be finalized with Build(). 186 // modified, and it can be finalized with Build().
183 struct URLRequestContextConfigBuilder { 187 struct URLRequestContextConfigBuilder {
184 URLRequestContextConfigBuilder(); 188 URLRequestContextConfigBuilder();
185 ~URLRequestContextConfigBuilder(); 189 ~URLRequestContextConfigBuilder();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // Data to populate CertVerifierCache. 238 // Data to populate CertVerifierCache.
235 std::string cert_verifier_data = ""; 239 std::string cert_verifier_data = "";
236 240
237 private: 241 private:
238 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfigBuilder); 242 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfigBuilder);
239 }; 243 };
240 244
241 } // namespace cronet 245 } // namespace cronet
242 246
243 #endif // COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ 247 #endif // COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698