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

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

Issue 10203002: Make URLRequestThrottlerManager a member of URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 years, 7 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/url_request/url_request_context.cc ('k') | net/url_request/url_request_context_storage.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) 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 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_
6 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 11 matching lines...) Expand all
22 class HttpServerProperties; 22 class HttpServerProperties;
23 class HttpTransactionFactory; 23 class HttpTransactionFactory;
24 class NetLog; 24 class NetLog;
25 class NetworkDelegate; 25 class NetworkDelegate;
26 class ServerBoundCertService; 26 class ServerBoundCertService;
27 class ProxyService; 27 class ProxyService;
28 class SSLConfigService; 28 class SSLConfigService;
29 class TransportSecurityState; 29 class TransportSecurityState;
30 class URLRequestContext; 30 class URLRequestContext;
31 class URLRequestJobFactory; 31 class URLRequestJobFactory;
32 class URLRequestThrottlerManager;
32 33
33 // URLRequestContextStorage is a helper class that provides storage for unowned 34 // URLRequestContextStorage is a helper class that provides storage for unowned
34 // member variables of URLRequestContext. 35 // member variables of URLRequestContext.
35 class NET_EXPORT URLRequestContextStorage { 36 class NET_EXPORT URLRequestContextStorage {
36 public: 37 public:
37 // Note that URLRequestContextStorage does not acquire a reference to 38 // Note that URLRequestContextStorage does not acquire a reference to
38 // URLRequestContext, since it is often designed to be embedded in a 39 // URLRequestContext, since it is often designed to be embedded in a
39 // URLRequestContext subclass. 40 // URLRequestContext subclass.
40 explicit URLRequestContextStorage(URLRequestContext* context); 41 explicit URLRequestContextStorage(URLRequestContext* context);
41 ~URLRequestContextStorage(); 42 ~URLRequestContextStorage();
(...skipping 15 matching lines...) Expand all
57 void set_network_delegate(NetworkDelegate* network_delegate); 58 void set_network_delegate(NetworkDelegate* network_delegate);
58 void set_http_server_properties(HttpServerProperties* http_server_properties); 59 void set_http_server_properties(HttpServerProperties* http_server_properties);
59 void set_cookie_store(CookieStore* cookie_store); 60 void set_cookie_store(CookieStore* cookie_store);
60 void set_transport_security_state( 61 void set_transport_security_state(
61 TransportSecurityState* transport_security_state); 62 TransportSecurityState* transport_security_state);
62 void set_http_transaction_factory( 63 void set_http_transaction_factory(
63 HttpTransactionFactory* http_transaction_factory); 64 HttpTransactionFactory* http_transaction_factory);
64 void set_ftp_transaction_factory( 65 void set_ftp_transaction_factory(
65 FtpTransactionFactory* ftp_transaction_factory); 66 FtpTransactionFactory* ftp_transaction_factory);
66 void set_job_factory(URLRequestJobFactory* job_factory); 67 void set_job_factory(URLRequestJobFactory* job_factory);
68 void set_throttler_manager(URLRequestThrottlerManager* throttler_manager);
67 69
68 private: 70 private:
69 // We use a raw pointer to prevent reference cycles, since 71 // We use a raw pointer to prevent reference cycles, since
70 // URLRequestContextStorage can often be contained within a URLRequestContext 72 // URLRequestContextStorage can often be contained within a URLRequestContext
71 // subclass. 73 // subclass.
72 URLRequestContext* const context_; 74 URLRequestContext* const context_;
73 75
74 // Owned members. 76 // Owned members.
75 scoped_ptr<NetLog> net_log_; 77 scoped_ptr<NetLog> net_log_;
76 scoped_ptr<HostResolver> host_resolver_; 78 scoped_ptr<HostResolver> host_resolver_;
77 scoped_ptr<CertVerifier> cert_verifier_; 79 scoped_ptr<CertVerifier> cert_verifier_;
78 scoped_ptr<ServerBoundCertService> server_bound_cert_service_; 80 scoped_ptr<ServerBoundCertService> server_bound_cert_service_;
79 scoped_ptr<FraudulentCertificateReporter> fraudulent_certificate_reporter_; 81 scoped_ptr<FraudulentCertificateReporter> fraudulent_certificate_reporter_;
80 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; 82 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_;
81 scoped_ptr<ProxyService> proxy_service_; 83 scoped_ptr<ProxyService> proxy_service_;
82 // TODO(willchan): Remove refcounting on these members. 84 // TODO(willchan): Remove refcounting on these members.
83 scoped_refptr<SSLConfigService> ssl_config_service_; 85 scoped_refptr<SSLConfigService> ssl_config_service_;
84 scoped_ptr<NetworkDelegate> network_delegate_; 86 scoped_ptr<NetworkDelegate> network_delegate_;
85 scoped_ptr<HttpServerProperties> http_server_properties_; 87 scoped_ptr<HttpServerProperties> http_server_properties_;
86 scoped_refptr<CookieStore> cookie_store_; 88 scoped_refptr<CookieStore> cookie_store_;
87 scoped_ptr<TransportSecurityState> transport_security_state_; 89 scoped_ptr<TransportSecurityState> transport_security_state_;
88 90
89 scoped_ptr<HttpTransactionFactory> http_transaction_factory_; 91 scoped_ptr<HttpTransactionFactory> http_transaction_factory_;
90 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; 92 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_;
91 scoped_ptr<URLRequestJobFactory> job_factory_; 93 scoped_ptr<URLRequestJobFactory> job_factory_;
94 scoped_ptr<URLRequestThrottlerManager> throttler_manager_;
92 95
93 DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage); 96 DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage);
94 }; 97 };
95 98
96 } // namespace net 99 } // namespace net
97 100
98 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ 101 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_context.cc ('k') | net/url_request/url_request_context_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698