| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 public: | 51 public: |
| 52 URLRequestContext(); | 52 URLRequestContext(); |
| 53 virtual ~URLRequestContext(); | 53 virtual ~URLRequestContext(); |
| 54 | 54 |
| 55 // Copies the state from |other| into this context. | 55 // Copies the state from |other| into this context. |
| 56 void CopyFrom(const URLRequestContext* other); | 56 void CopyFrom(const URLRequestContext* other); |
| 57 | 57 |
| 58 // May return NULL if this context doesn't have an associated network session. | 58 // May return NULL if this context doesn't have an associated network session. |
| 59 const HttpNetworkSession::Params* GetNetworkSessionParams() const; | 59 const HttpNetworkSession::Params* GetNetworkSessionParams() const; |
| 60 | 60 |
| 61 // Creates a URLRequest. |cookie_store| optionally specifies a cookie store | |
| 62 // to be used rather than the one represented by the context, or NULL | |
| 63 // otherwise. | |
| 64 scoped_ptr<URLRequest> CreateRequest(const GURL& url, | 61 scoped_ptr<URLRequest> CreateRequest(const GURL& url, |
| 65 RequestPriority priority, | 62 RequestPriority priority, |
| 66 URLRequest::Delegate* delegate, | 63 URLRequest::Delegate* delegate) const; |
| 67 CookieStore* cookie_store) const; | |
| 68 | 64 |
| 69 NetLog* net_log() const { | 65 NetLog* net_log() const { |
| 70 return net_log_; | 66 return net_log_; |
| 71 } | 67 } |
| 72 | 68 |
| 73 void set_net_log(NetLog* net_log) { | 69 void set_net_log(NetLog* net_log) { |
| 74 net_log_ = net_log; | 70 net_log_ = net_log; |
| 75 } | 71 } |
| 76 | 72 |
| 77 HostResolver* host_resolver() const { | 73 HostResolver* host_resolver() const { |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // --------------------------------------------------------------------------- | 230 // --------------------------------------------------------------------------- |
| 235 | 231 |
| 236 scoped_ptr<std::set<const URLRequest*> > url_requests_; | 232 scoped_ptr<std::set<const URLRequest*> > url_requests_; |
| 237 | 233 |
| 238 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 234 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 239 }; | 235 }; |
| 240 | 236 |
| 241 } // namespace net | 237 } // namespace net |
| 242 | 238 |
| 243 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 239 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |