OLD | NEW |
---|---|
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 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
169 // App-provided list of servers that support QUIC. | 169 // App-provided list of servers that support QUIC. |
170 ScopedVector<QuicHint> quic_hints; | 170 ScopedVector<QuicHint> quic_hints; |
171 | 171 |
172 // The list of public key pins. | 172 // The list of public key pins. |
173 ScopedVector<Pkp> pkp_list; | 173 ScopedVector<Pkp> pkp_list; |
174 | 174 |
175 private: | 175 private: |
176 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfig); | 176 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfig); |
177 }; | 177 }; |
178 | 178 |
179 // Intermediate state for URLRequestContextConfig | |
mef
2016/12/20 19:32:04
Full sentence, better description to explain the u
lilyhoughton
2016/12/20 21:31:40
Done.
| |
180 struct URLRequestContextConfigBuilder { | |
181 URLRequestContextConfigBuilder(); | |
182 ~URLRequestContextConfigBuilder(); | |
183 | |
184 std::unique_ptr<URLRequestContextConfig> Build(); | |
mef
2016/12/20 19:32:04
Need comments for public methods.
lilyhoughton
2016/12/20 21:31:40
Done.
| |
185 | |
186 // Enable QUIC. | |
187 bool enable_quic = false; | |
188 // QUIC User Agent ID. | |
189 std::string quic_user_agent_id = ""; | |
190 // Enable SPDY. | |
191 bool enable_spdy = false; | |
192 // Enable SDCH. | |
193 bool enable_sdch = false; | |
194 // Type of http cache. | |
195 URLRequestContextConfig::HttpCacheType http_cache = | |
196 URLRequestContextConfig::DISK; | |
197 // Max size of http cache in bytes. | |
198 int http_cache_max_size = 0; | |
199 // Disable caching for HTTP responses. Other information may be stored in | |
200 // the cache. | |
201 bool load_disable_cache = false; | |
202 // Storage path for http cache and cookie storage. | |
203 std::string storage_path = ""; | |
204 // User-Agent request header field. | |
205 std::string user_agent = ""; | |
206 // Experimental options encoded as a string in a JSON format containing | |
207 // experiments and their corresponding configuration options. The format | |
208 // is a JSON object with the name of the experiment as the key, and the | |
209 // configuration options as the value. An example: | |
210 // {"experiment1": {"option1": "option_value1", "option2": "option_value2", | |
211 // ...}, "experiment2: {"option3", "option_value3", ...}, ...} | |
212 std::string experimental_options = "{}"; | |
213 // Enable Data Reduction Proxy with authentication key. | |
214 std::string data_reduction_proxy_key = ""; | |
215 std::string data_reduction_primary_proxy = ""; | |
216 std::string data_reduction_fallback_proxy = ""; | |
217 std::string data_reduction_secure_proxy_check_url = ""; | |
218 | |
219 // Certificate verifier for testing. | |
220 std::unique_ptr<net::CertVerifier> mock_cert_verifier = nullptr; | |
221 | |
222 // Enable network quality estimator. | |
223 bool enable_network_quality_estimator = false; | |
224 | |
225 // Enable public key pinning bypass for local trust anchors. | |
226 bool bypass_public_key_pinning_for_local_trust_anchors = true; | |
227 | |
228 // Data to populte CertVerifierCache. | |
mef
2016/12/20 19:32:05
nit: populate (sp)
lilyhoughton
2016/12/20 21:31:40
Done.
| |
229 std::string cert_verifier_data = ""; | |
230 | |
231 private: | |
232 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfigBuilder); | |
233 }; | |
234 | |
179 } // namespace cronet | 235 } // namespace cronet |
180 | 236 |
181 #endif // COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ | 237 #endif // COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ |
OLD | NEW |