Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1194)

Side by Side Diff: net/url_request/url_request_context.h

Issue 7827033: Introduce net::HttpServerPropertiesManager to manage server-specific properties. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_test_util.cc ('k') | net/url_request/url_request_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_
11 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ 11 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
12 #pragma once 12 #pragma once
13 13
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/threading/non_thread_safe.h" 17 #include "base/threading/non_thread_safe.h"
18 #include "net/base/net_export.h" 18 #include "net/base/net_export.h"
19 #include "net/base/net_log.h" 19 #include "net/base/net_log.h"
20 #include "net/base/ssl_config_service.h" 20 #include "net/base/ssl_config_service.h"
21 #include "net/base/transport_security_state.h" 21 #include "net/base/transport_security_state.h"
22 #include "net/http/http_server_properties.h"
22 #include "net/ftp/ftp_auth_cache.h" 23 #include "net/ftp/ftp_auth_cache.h"
23 24
24 namespace net { 25 namespace net {
25 class CertVerifier; 26 class CertVerifier;
26 class CookieStore; 27 class CookieStore;
27 class DnsCertProvenanceChecker; 28 class DnsCertProvenanceChecker;
28 class DnsRRResolver; 29 class DnsRRResolver;
29 class FtpTransactionFactory; 30 class FtpTransactionFactory;
30 class HostResolver; 31 class HostResolver;
31 class HttpAuthHandlerFactory; 32 class HttpAuthHandlerFactory;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 137 }
137 void set_ftp_transaction_factory(FtpTransactionFactory* factory) { 138 void set_ftp_transaction_factory(FtpTransactionFactory* factory) {
138 ftp_transaction_factory_ = factory; 139 ftp_transaction_factory_ = factory;
139 } 140 }
140 141
141 void set_network_delegate(NetworkDelegate* network_delegate) { 142 void set_network_delegate(NetworkDelegate* network_delegate) {
142 network_delegate_ = network_delegate; 143 network_delegate_ = network_delegate;
143 } 144 }
144 NetworkDelegate* network_delegate() const { return network_delegate_; } 145 NetworkDelegate* network_delegate() const { return network_delegate_; }
145 146
147 void set_http_server_properties(
148 HttpServerProperties* http_server_properties) {
149 http_server_properties_ = http_server_properties;
150 }
151 HttpServerProperties* http_server_properties() const {
152 return http_server_properties_;
153 }
154
146 // Gets the cookie store for this context (may be null, in which case 155 // Gets the cookie store for this context (may be null, in which case
147 // cookies are not stored). 156 // cookies are not stored).
148 CookieStore* cookie_store() const { return cookie_store_.get(); } 157 CookieStore* cookie_store() const { return cookie_store_.get(); }
149 void set_cookie_store(CookieStore* cookie_store); 158 void set_cookie_store(CookieStore* cookie_store);
150 159
151 TransportSecurityState* transport_security_state() const { 160 TransportSecurityState* transport_security_state() const {
152 return transport_security_state_; 161 return transport_security_state_;
153 } 162 }
154 void set_transport_security_state( 163 void set_transport_security_state(
155 TransportSecurityState* state) { 164 TransportSecurityState* state) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 NetLog* net_log_; 215 NetLog* net_log_;
207 HostResolver* host_resolver_; 216 HostResolver* host_resolver_;
208 CertVerifier* cert_verifier_; 217 CertVerifier* cert_verifier_;
209 OriginBoundCertService* origin_bound_cert_service_; 218 OriginBoundCertService* origin_bound_cert_service_;
210 DnsRRResolver* dnsrr_resolver_; 219 DnsRRResolver* dnsrr_resolver_;
211 DnsCertProvenanceChecker* dns_cert_checker_; 220 DnsCertProvenanceChecker* dns_cert_checker_;
212 HttpAuthHandlerFactory* http_auth_handler_factory_; 221 HttpAuthHandlerFactory* http_auth_handler_factory_;
213 ProxyService* proxy_service_; 222 ProxyService* proxy_service_;
214 scoped_refptr<SSLConfigService> ssl_config_service_; 223 scoped_refptr<SSLConfigService> ssl_config_service_;
215 NetworkDelegate* network_delegate_; 224 NetworkDelegate* network_delegate_;
225 HttpServerProperties* http_server_properties_;
216 scoped_refptr<CookieStore> cookie_store_; 226 scoped_refptr<CookieStore> cookie_store_;
217 TransportSecurityState* transport_security_state_; 227 TransportSecurityState* transport_security_state_;
218 scoped_ptr<FtpAuthCache> ftp_auth_cache_; 228 scoped_ptr<FtpAuthCache> ftp_auth_cache_;
219 std::string accept_language_; 229 std::string accept_language_;
220 std::string accept_charset_; 230 std::string accept_charset_;
221 // The charset of the referrer where this request comes from. It's not 231 // The charset of the referrer where this request comes from. It's not
222 // used in communication with a server but is used to construct a suggested 232 // used in communication with a server but is used to construct a suggested
223 // filename for file download. 233 // filename for file download.
224 std::string referrer_charset_; 234 std::string referrer_charset_;
225 HttpTransactionFactory* http_transaction_factory_; 235 HttpTransactionFactory* http_transaction_factory_;
226 FtpTransactionFactory* ftp_transaction_factory_; 236 FtpTransactionFactory* ftp_transaction_factory_;
227 const URLRequestJobFactory* job_factory_; 237 const URLRequestJobFactory* job_factory_;
228 238
229 // --------------------------------------------------------------------------- 239 // ---------------------------------------------------------------------------
230 // Important: When adding any new members below, consider whether they need to 240 // Important: When adding any new members below, consider whether they need to
231 // be added to CopyFrom. 241 // be added to CopyFrom.
232 // --------------------------------------------------------------------------- 242 // ---------------------------------------------------------------------------
233 243
234 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); 244 DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
235 }; 245 };
236 246
237 } // namespace net 247 } // namespace net
238 248
239 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ 249 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_test_util.cc ('k') | net/url_request/url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698