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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 } | 238 } |
239 | 239 |
240 void set_has_known_mismatched_cookie_store() { | 240 void set_has_known_mismatched_cookie_store() { |
241 has_known_mismatched_cookie_store_ = true; | 241 has_known_mismatched_cookie_store_ = true; |
242 } | 242 } |
243 | 243 |
244 void set_enable_brotli(bool enable_brotli) { enable_brotli_ = enable_brotli; } | 244 void set_enable_brotli(bool enable_brotli) { enable_brotli_ = enable_brotli; } |
245 | 245 |
246 bool enable_brotli() const { return enable_brotli_; } | 246 bool enable_brotli() const { return enable_brotli_; } |
247 | 247 |
| 248 void set_enable_referrer_policy_header(bool enable_referrer_policy_header) { |
| 249 enable_referrer_policy_header_ = enable_referrer_policy_header; |
| 250 } |
| 251 |
| 252 bool enable_referrer_policy_header() const { |
| 253 return enable_referrer_policy_header_; |
| 254 } |
| 255 |
248 private: | 256 private: |
249 // --------------------------------------------------------------------------- | 257 // --------------------------------------------------------------------------- |
250 // Important: When adding any new members below, consider whether they need to | 258 // Important: When adding any new members below, consider whether they need to |
251 // be added to CopyFrom. | 259 // be added to CopyFrom. |
252 // --------------------------------------------------------------------------- | 260 // --------------------------------------------------------------------------- |
253 | 261 |
254 // Ownership for these members are not defined here. Clients should either | 262 // Ownership for these members are not defined here. Clients should either |
255 // provide storage elsewhere or have a subclass take ownership. | 263 // provide storage elsewhere or have a subclass take ownership. |
256 NetLog* net_log_; | 264 NetLog* net_log_; |
257 HostResolver* host_resolver_; | 265 HostResolver* host_resolver_; |
(...skipping 20 matching lines...) Expand all Loading... |
278 // Important: When adding any new members below, consider whether they need to | 286 // Important: When adding any new members below, consider whether they need to |
279 // be added to CopyFrom. | 287 // be added to CopyFrom. |
280 // --------------------------------------------------------------------------- | 288 // --------------------------------------------------------------------------- |
281 | 289 |
282 std::unique_ptr<std::set<const URLRequest*>> url_requests_; | 290 std::unique_ptr<std::set<const URLRequest*>> url_requests_; |
283 bool has_known_mismatched_cookie_store_; | 291 bool has_known_mismatched_cookie_store_; |
284 | 292 |
285 // Enables Brotli Content-Encoding support. | 293 // Enables Brotli Content-Encoding support. |
286 bool enable_brotli_; | 294 bool enable_brotli_; |
287 | 295 |
| 296 // Enables parsing and applying the Referrer-Policy header when |
| 297 // following redirects. TODO(estark): remove this flag once |
| 298 // Referrer-Policy ships (https://crbug.com/619228). |
| 299 bool enable_referrer_policy_header_; |
| 300 |
288 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 301 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
289 }; | 302 }; |
290 | 303 |
291 } // namespace net | 304 } // namespace net |
292 | 305 |
293 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 306 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |