| 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. |
| 61 scoped_ptr<URLRequest> CreateRequest(const GURL& url, | 64 scoped_ptr<URLRequest> CreateRequest(const GURL& url, |
| 62 RequestPriority priority, | 65 RequestPriority priority, |
| 63 URLRequest::Delegate* delegate) const; | 66 URLRequest::Delegate* delegate, |
| 67 CookieStore* cookie_store) const; |
| 64 | 68 |
| 65 NetLog* net_log() const { | 69 NetLog* net_log() const { |
| 66 return net_log_; | 70 return net_log_; |
| 67 } | 71 } |
| 68 | 72 |
| 69 void set_net_log(NetLog* net_log) { | 73 void set_net_log(NetLog* net_log) { |
| 70 net_log_ = net_log; | 74 net_log_ = net_log; |
| 71 } | 75 } |
| 72 | 76 |
| 73 HostResolver* host_resolver() const { | 77 HostResolver* host_resolver() const { |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 // --------------------------------------------------------------------------- | 234 // --------------------------------------------------------------------------- |
| 231 | 235 |
| 232 scoped_ptr<std::set<const URLRequest*> > url_requests_; | 236 scoped_ptr<std::set<const URLRequest*> > url_requests_; |
| 233 | 237 |
| 234 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 238 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 235 }; | 239 }; |
| 236 | 240 |
| 237 } // namespace net | 241 } // namespace net |
| 238 | 242 |
| 239 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 243 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |