| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 URLRequestContext(); | 66 URLRequestContext(); |
| 67 ~URLRequestContext() override; | 67 ~URLRequestContext() override; |
| 68 | 68 |
| 69 // Copies the state from |other| into this context. | 69 // Copies the state from |other| into this context. |
| 70 void CopyFrom(const URLRequestContext* other); | 70 void CopyFrom(const URLRequestContext* other); |
| 71 | 71 |
| 72 // May return nullptr if this context doesn't have an associated network | 72 // May return nullptr if this context doesn't have an associated network |
| 73 // session. | 73 // session. |
| 74 const HttpNetworkSession::Params* GetNetworkSessionParams() const; | 74 const HttpNetworkSession::Params* GetNetworkSessionParams() const; |
| 75 | 75 |
| 76 // May return nullptr if this context doesn't have an associated network |
| 77 // session. |
| 78 const HttpNetworkSession::Context* GetNetworkSessionContext() const; |
| 79 |
| 76 // This function should not be used in Chromium, please use the version with | 80 // This function should not be used in Chromium, please use the version with |
| 77 // NetworkTrafficAnnotationTag in the future. | 81 // NetworkTrafficAnnotationTag in the future. |
| 78 std::unique_ptr<URLRequest> CreateRequest( | 82 std::unique_ptr<URLRequest> CreateRequest( |
| 79 const GURL& url, | 83 const GURL& url, |
| 80 RequestPriority priority, | 84 RequestPriority priority, |
| 81 URLRequest::Delegate* delegate) const; | 85 URLRequest::Delegate* delegate) const; |
| 82 | 86 |
| 83 // |traffic_annotation| is metadata about the network traffic send via this | 87 // |traffic_annotation| is metadata about the network traffic send via this |
| 84 // URLRequest, see net::DefineNetworkTrafficAnnotation. Note that: | 88 // URLRequest, see net::DefineNetworkTrafficAnnotation. Note that: |
| 85 // - net provides the API for tagging requests with an opaque identifier. | 89 // - net provides the API for tagging requests with an opaque identifier. |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 // The largest number of outstanding URLRequests that have been created by | 336 // The largest number of outstanding URLRequests that have been created by |
| 333 // |this| and are not yet destroyed. This doesn't need to be in CopyFrom. | 337 // |this| and are not yet destroyed. This doesn't need to be in CopyFrom. |
| 334 mutable size_t largest_outstanding_requests_count_seen_; | 338 mutable size_t largest_outstanding_requests_count_seen_; |
| 335 | 339 |
| 336 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 340 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 337 }; | 341 }; |
| 338 | 342 |
| 339 } // namespace net | 343 } // namespace net |
| 340 | 344 |
| 341 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 345 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |