| 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 useful when processing resource requests. | 6 // that's useful when processing resource requests. |
| 7 // The class is reference-counted so that it can be cleaned up after any | 7 // The class is reference-counted so that it can be cleaned up after any |
| 8 // requests that are using it have been completed. | 8 // requests that are using it have been completed. |
| 9 | 9 |
| 10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| (...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 |
| 233 private: | 241 private: |
| 234 // --------------------------------------------------------------------------- | 242 // --------------------------------------------------------------------------- |
| 235 // Important: When adding any new members below, consider whether they need to | 243 // Important: When adding any new members below, consider whether they need to |
| 236 // be added to CopyFrom. | 244 // be added to CopyFrom. |
| 237 // --------------------------------------------------------------------------- | 245 // --------------------------------------------------------------------------- |
| 238 | 246 |
| 239 // Ownership for these members are not defined here. Clients should either | 247 // Ownership for these members are not defined here. Clients should either |
| 240 // provide storage elsewhere or have a subclass take ownership. | 248 // provide storage elsewhere or have a subclass take ownership. |
| 241 NetLog* net_log_; | 249 NetLog* net_log_; |
| 242 HostResolver* host_resolver_; | 250 HostResolver* host_resolver_; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 262 // --------------------------------------------------------------------------- | 270 // --------------------------------------------------------------------------- |
| 263 // Important: When adding any new members below, consider whether they need to | 271 // Important: When adding any new members below, consider whether they need to |
| 264 // be added to CopyFrom. | 272 // be added to CopyFrom. |
| 265 // --------------------------------------------------------------------------- | 273 // --------------------------------------------------------------------------- |
| 266 | 274 |
| 267 std::unique_ptr<std::set<const URLRequest*>> url_requests_; | 275 std::unique_ptr<std::set<const URLRequest*>> url_requests_; |
| 268 | 276 |
| 269 // Enables Brotli Content-Encoding support. | 277 // Enables Brotli Content-Encoding support. |
| 270 bool enable_brotli_; | 278 bool enable_brotli_; |
| 271 | 279 |
| 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 |
| 272 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 285 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 273 }; | 286 }; |
| 274 | 287 |
| 275 } // namespace net | 288 } // namespace net |
| 276 | 289 |
| 277 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 290 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |