Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This class is useful for building a simple URLRequestContext. Most creators | 5 // This class is useful for building a simple URLRequestContext. Most creators |
| 6 // of new URLRequestContexts should use this helper class to construct it. Call | 6 // of new URLRequestContexts should use this helper class to construct it. Call |
| 7 // any configuration params, and when done, invoke Build() to construct the | 7 // any configuration params, and when done, invoke Build() to construct the |
| 8 // URLRequestContext. This URLRequestContext will own all its own storage. | 8 // URLRequestContext. This URLRequestContext will own all its own storage. |
| 9 // | 9 // |
| 10 // URLRequestContextBuilder and its associated params classes are initially | 10 // URLRequestContextBuilder and its associated params classes are initially |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 // By default HttpCache is enabled with a default constructed HttpCacheParams. | 166 // By default HttpCache is enabled with a default constructed HttpCacheParams. |
| 167 void EnableHttpCache(const HttpCacheParams& params); | 167 void EnableHttpCache(const HttpCacheParams& params); |
| 168 void DisableHttpCache(); | 168 void DisableHttpCache(); |
| 169 | 169 |
| 170 // Override default HttpNetworkSession::Params settings. | 170 // Override default HttpNetworkSession::Params settings. |
| 171 void set_http_network_session_params( | 171 void set_http_network_session_params( |
| 172 const HttpNetworkSessionParams& http_network_session_params) { | 172 const HttpNetworkSessionParams& http_network_session_params) { |
| 173 http_network_session_params_ = http_network_session_params; | 173 http_network_session_params_ = http_network_session_params; |
| 174 } | 174 } |
| 175 | 175 |
| 176 void set_ignore_certificate_errors(bool ignore_certificate_errors) { | |
|
pauljensen
2015/10/08 18:39:25
This needs a comment
xunjieli
2015/10/09 19:53:28
Done.
| |
| 177 http_network_session_params_.ignore_certificate_errors = | |
| 178 ignore_certificate_errors; | |
| 179 } | |
| 180 | |
| 176 void set_transport_security_persister_path( | 181 void set_transport_security_persister_path( |
| 177 const base::FilePath& transport_security_persister_path) { | 182 const base::FilePath& transport_security_persister_path) { |
| 178 transport_security_persister_path_ = transport_security_persister_path; | 183 transport_security_persister_path_ = transport_security_persister_path; |
| 179 } | 184 } |
| 180 | 185 |
| 181 // Adjust |http_network_session_params_.next_protos| to enable SPDY and QUIC. | 186 // Adjust |http_network_session_params_.next_protos| to enable SPDY and QUIC. |
| 182 void SetSpdyAndQuicEnabled(bool spdy_enabled, | 187 void SetSpdyAndQuicEnabled(bool spdy_enabled, |
| 183 bool quic_enabled); | 188 bool quic_enabled); |
| 184 | 189 |
| 185 void set_quic_connection_options( | 190 void set_quic_connection_options( |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 270 std::vector<SchemeFactory> extra_http_auth_handlers_; | 275 std::vector<SchemeFactory> extra_http_auth_handlers_; |
| 271 ScopedVector<URLRequestInterceptor> url_request_interceptors_; | 276 ScopedVector<URLRequestInterceptor> url_request_interceptors_; |
| 272 scoped_ptr<HttpServerProperties> http_server_properties_; | 277 scoped_ptr<HttpServerProperties> http_server_properties_; |
| 273 | 278 |
| 274 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 279 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
| 275 }; | 280 }; |
| 276 | 281 |
| 277 } // namespace net | 282 } // namespace net |
| 278 | 283 |
| 279 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 284 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
| OLD | NEW |