| 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 represents contextual information (cookies, cache, etc.) | 5 // This class represents contextual information (cookies, cache, etc.) |
| 6 // that's necessary when processing resource requests. | 6 // that's necessary when processing resource requests. |
| 7 | 7 |
| 8 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 8 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| 9 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 9 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| 10 | 10 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 } | 223 } |
| 224 void set_network_quality_estimator( | 224 void set_network_quality_estimator( |
| 225 NetworkQualityEstimator* network_quality_estimator) { | 225 NetworkQualityEstimator* network_quality_estimator) { |
| 226 network_quality_estimator_ = network_quality_estimator; | 226 network_quality_estimator_ = network_quality_estimator; |
| 227 } | 227 } |
| 228 | 228 |
| 229 void set_enable_brotli(bool enable_brotli) { enable_brotli_ = enable_brotli; } | 229 void set_enable_brotli(bool enable_brotli) { enable_brotli_ = enable_brotli; } |
| 230 | 230 |
| 231 bool enable_brotli() const { return enable_brotli_; } | 231 bool enable_brotli() const { return enable_brotli_; } |
| 232 | 232 |
| 233 void set_enable_referrer_policy_header(bool enable_referrer_policy_header) { | |
| 234 enable_referrer_policy_header_ = enable_referrer_policy_header; | |
| 235 } | |
| 236 | |
| 237 bool enable_referrer_policy_header() const { | |
| 238 return enable_referrer_policy_header_; | |
| 239 } | |
| 240 | |
| 241 private: | 233 private: |
| 242 // --------------------------------------------------------------------------- | 234 // --------------------------------------------------------------------------- |
| 243 // Important: When adding any new members below, consider whether they need to | 235 // Important: When adding any new members below, consider whether they need to |
| 244 // be added to CopyFrom. | 236 // be added to CopyFrom. |
| 245 // --------------------------------------------------------------------------- | 237 // --------------------------------------------------------------------------- |
| 246 | 238 |
| 247 // Ownership for these members are not defined here. Clients should either | 239 // Ownership for these members are not defined here. Clients should either |
| 248 // provide storage elsewhere or have a subclass take ownership. | 240 // provide storage elsewhere or have a subclass take ownership. |
| 249 NetLog* net_log_; | 241 NetLog* net_log_; |
| 250 HostResolver* host_resolver_; | 242 HostResolver* host_resolver_; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 270 // --------------------------------------------------------------------------- | 262 // --------------------------------------------------------------------------- |
| 271 // Important: When adding any new members below, consider whether they need to | 263 // Important: When adding any new members below, consider whether they need to |
| 272 // be added to CopyFrom. | 264 // be added to CopyFrom. |
| 273 // --------------------------------------------------------------------------- | 265 // --------------------------------------------------------------------------- |
| 274 | 266 |
| 275 std::unique_ptr<std::set<const URLRequest*>> url_requests_; | 267 std::unique_ptr<std::set<const URLRequest*>> url_requests_; |
| 276 | 268 |
| 277 // Enables Brotli Content-Encoding support. | 269 // Enables Brotli Content-Encoding support. |
| 278 bool enable_brotli_; | 270 bool enable_brotli_; |
| 279 | 271 |
| 280 // Enables parsing and applying the Referrer-Policy header when | |
| 281 // following redirects. TODO(estark): remove this flag once | |
| 282 // Referrer-Policy ships (https://crbug.com/619228). | |
| 283 bool enable_referrer_policy_header_; | |
| 284 | |
| 285 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 272 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 286 }; | 273 }; |
| 287 | 274 |
| 288 } // namespace net | 275 } // namespace net |
| 289 | 276 |
| 290 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 277 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |