| 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 // is ok to do that. This helps in logging to filter legitimate cases of this | 228 // is ok to do that. This helps in logging to filter legitimate cases of this |
| 229 // mismatch from other cases. | 229 // mismatch from other cases. |
| 230 bool has_known_mismatched_cookie_store() const { | 230 bool has_known_mismatched_cookie_store() const { |
| 231 return has_known_mismatched_cookie_store_; | 231 return has_known_mismatched_cookie_store_; |
| 232 } | 232 } |
| 233 | 233 |
| 234 void set_has_known_mismatched_cookie_store() { | 234 void set_has_known_mismatched_cookie_store() { |
| 235 has_known_mismatched_cookie_store_ = true; | 235 has_known_mismatched_cookie_store_ = true; |
| 236 } | 236 } |
| 237 | 237 |
| 238 void set_enable_brotli(bool enable_brotli) { enable_brotli_ = enable_brotli; } |
| 239 |
| 240 bool enable_brotli() const { return enable_brotli_; } |
| 241 |
| 238 private: | 242 private: |
| 239 // --------------------------------------------------------------------------- | 243 // --------------------------------------------------------------------------- |
| 240 // Important: When adding any new members below, consider whether they need to | 244 // Important: When adding any new members below, consider whether they need to |
| 241 // be added to CopyFrom. | 245 // be added to CopyFrom. |
| 242 // --------------------------------------------------------------------------- | 246 // --------------------------------------------------------------------------- |
| 243 | 247 |
| 244 // Ownership for these members are not defined here. Clients should either | 248 // Ownership for these members are not defined here. Clients should either |
| 245 // provide storage elsewhere or have a subclass take ownership. | 249 // provide storage elsewhere or have a subclass take ownership. |
| 246 NetLog* net_log_; | 250 NetLog* net_log_; |
| 247 HostResolver* host_resolver_; | 251 HostResolver* host_resolver_; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 264 NetworkQualityEstimator* network_quality_estimator_; | 268 NetworkQualityEstimator* network_quality_estimator_; |
| 265 | 269 |
| 266 // --------------------------------------------------------------------------- | 270 // --------------------------------------------------------------------------- |
| 267 // 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 |
| 268 // be added to CopyFrom. | 272 // be added to CopyFrom. |
| 269 // --------------------------------------------------------------------------- | 273 // --------------------------------------------------------------------------- |
| 270 | 274 |
| 271 std::unique_ptr<std::set<const URLRequest*>> url_requests_; | 275 std::unique_ptr<std::set<const URLRequest*>> url_requests_; |
| 272 bool has_known_mismatched_cookie_store_; | 276 bool has_known_mismatched_cookie_store_; |
| 273 | 277 |
| 278 // Enables Brotli Content-Encoding support. |
| 279 bool enable_brotli_; |
| 280 |
| 274 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 281 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 275 }; | 282 }; |
| 276 | 283 |
| 277 } // namespace net | 284 } // namespace net |
| 278 | 285 |
| 279 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 286 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |