| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 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 | 62 // to be used rather than the one represented by the context, or NULL |
| 63 // otherwise. | 63 // otherwise. |
| 64 scoped_ptr<URLRequest> CreateRequest(const GURL& url, | 64 scoped_ptr<URLRequest> CreateRequest(const GURL& url, |
| 65 RequestPriority priority, | 65 RequestPriority priority, |
| 66 URLRequest::Delegate* delegate, | 66 URLRequest::Delegate* delegate, |
| 67 CookieStore* cookie_store) const; | 67 CookieStore* cookie_store) const; |
| 68 | 68 |
| 69 NetLog* net_log() const { | 69 NetLog* net_log() const { return net_log_; } |
| 70 return net_log_; | |
| 71 } | |
| 72 | 70 |
| 73 void set_net_log(NetLog* net_log) { | 71 void set_net_log(NetLog* net_log) { net_log_ = net_log; } |
| 74 net_log_ = net_log; | |
| 75 } | |
| 76 | 72 |
| 77 HostResolver* host_resolver() const { | 73 HostResolver* host_resolver() const { return host_resolver_; } |
| 78 return host_resolver_; | |
| 79 } | |
| 80 | 74 |
| 81 void set_host_resolver(HostResolver* host_resolver) { | 75 void set_host_resolver(HostResolver* host_resolver) { |
| 82 host_resolver_ = host_resolver; | 76 host_resolver_ = host_resolver; |
| 83 } | 77 } |
| 84 | 78 |
| 85 CertVerifier* cert_verifier() const { | 79 CertVerifier* cert_verifier() const { return cert_verifier_; } |
| 86 return cert_verifier_; | |
| 87 } | |
| 88 | 80 |
| 89 void set_cert_verifier(CertVerifier* cert_verifier) { | 81 void set_cert_verifier(CertVerifier* cert_verifier) { |
| 90 cert_verifier_ = cert_verifier; | 82 cert_verifier_ = cert_verifier; |
| 91 } | 83 } |
| 92 | 84 |
| 93 ServerBoundCertService* server_bound_cert_service() const { | 85 ServerBoundCertService* server_bound_cert_service() const { |
| 94 return server_bound_cert_service_; | 86 return server_bound_cert_service_; |
| 95 } | 87 } |
| 96 | 88 |
| 97 void set_server_bound_cert_service( | 89 void set_server_bound_cert_service( |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 } | 144 } |
| 153 | 145 |
| 154 // Gets the cookie store for this context (may be null, in which case | 146 // Gets the cookie store for this context (may be null, in which case |
| 155 // cookies are not stored). | 147 // cookies are not stored). |
| 156 CookieStore* cookie_store() const { return cookie_store_.get(); } | 148 CookieStore* cookie_store() const { return cookie_store_.get(); } |
| 157 void set_cookie_store(CookieStore* cookie_store); | 149 void set_cookie_store(CookieStore* cookie_store); |
| 158 | 150 |
| 159 TransportSecurityState* transport_security_state() const { | 151 TransportSecurityState* transport_security_state() const { |
| 160 return transport_security_state_; | 152 return transport_security_state_; |
| 161 } | 153 } |
| 162 void set_transport_security_state( | 154 void set_transport_security_state(TransportSecurityState* state) { |
| 163 TransportSecurityState* state) { | |
| 164 transport_security_state_ = state; | 155 transport_security_state_ = state; |
| 165 } | 156 } |
| 166 | 157 |
| 167 CTVerifier* cert_transparency_verifier() const { | 158 CTVerifier* cert_transparency_verifier() const { |
| 168 return cert_transparency_verifier_; | 159 return cert_transparency_verifier_; |
| 169 } | 160 } |
| 170 void set_cert_transparency_verifier(CTVerifier* verifier) { | 161 void set_cert_transparency_verifier(CTVerifier* verifier) { |
| 171 cert_transparency_verifier_ = verifier; | 162 cert_transparency_verifier_ = verifier; |
| 172 } | 163 } |
| 173 | 164 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // --------------------------------------------------------------------------- | 225 // --------------------------------------------------------------------------- |
| 235 | 226 |
| 236 scoped_ptr<std::set<const URLRequest*> > url_requests_; | 227 scoped_ptr<std::set<const URLRequest*> > url_requests_; |
| 237 | 228 |
| 238 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 229 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 239 }; | 230 }; |
| 240 | 231 |
| 241 } // namespace net | 232 } // namespace net |
| 242 | 233 |
| 243 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 234 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |