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

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

Issue 1239393003: Refactor main URLRequestContext creation to use URLRequestContextBuilder Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « net/url_request/url_request_context_builder.cc ('k') | no next file » | 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 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 29 matching lines...) Expand all
40 // URLRequestContext, since it is often designed to be embedded in a 40 // URLRequestContext, since it is often designed to be embedded in a
41 // URLRequestContext subclass. 41 // URLRequestContext subclass.
42 explicit URLRequestContextStorage(URLRequestContext* context); 42 explicit URLRequestContextStorage(URLRequestContext* context);
43 ~URLRequestContextStorage(); 43 ~URLRequestContextStorage();
44 44
45 // These setters will set both the member variables and call the setter on the 45 // These setters will set both the member variables and call the setter on the
46 // URLRequestContext object. In all cases, ownership is passed to |this|. 46 // URLRequestContext object. In all cases, ownership is passed to |this|.
47 47
48 void set_net_log(NetLog* net_log); 48 void set_net_log(NetLog* net_log);
49 void set_host_resolver(scoped_ptr<HostResolver> host_resolver); 49 void set_host_resolver(scoped_ptr<HostResolver> host_resolver);
50
50 void set_cert_verifier(CertVerifier* cert_verifier); 51 void set_cert_verifier(CertVerifier* cert_verifier);
52
51 void set_channel_id_service(scoped_ptr<ChannelIDService> channel_id_service); 53 void set_channel_id_service(scoped_ptr<ChannelIDService> channel_id_service);
52 void set_fraudulent_certificate_reporter( 54 void set_fraudulent_certificate_reporter(
53 FraudulentCertificateReporter* fraudulent_certificate_reporter); 55 FraudulentCertificateReporter* fraudulent_certificate_reporter);
56 FraudulentCertificateReporter* fraudulent_certificate_reporter() {
57 return fraudulent_certificate_reporter_.get();
58 }
59
54 void set_http_auth_handler_factory( 60 void set_http_auth_handler_factory(
55 HttpAuthHandlerFactory* http_auth_handler_factory); 61 HttpAuthHandlerFactory* http_auth_handler_factory);
56 void set_proxy_service(ProxyService* proxy_service); 62 void set_proxy_service(ProxyService* proxy_service);
57 void set_ssl_config_service(SSLConfigService* ssl_config_service); 63 void set_ssl_config_service(SSLConfigService* ssl_config_service);
58 void set_network_delegate(NetworkDelegate* network_delegate); 64 void set_network_delegate(NetworkDelegate* network_delegate);
59 void set_http_server_properties( 65 void set_http_server_properties(
60 scoped_ptr<HttpServerProperties> http_server_properties); 66 scoped_ptr<HttpServerProperties> http_server_properties);
61 void set_cookie_store(CookieStore* cookie_store); 67 void set_cookie_store(CookieStore* cookie_store);
62 void set_transport_security_state( 68 void set_transport_security_state(
63 TransportSecurityState* transport_security_state); 69 TransportSecurityState* transport_security_state);
70 TransportSecurityState* transport_security_state() {
71 return transport_security_state_.get();
72 }
64 void set_http_transaction_factory( 73 void set_http_transaction_factory(
65 HttpTransactionFactory* http_transaction_factory); 74 HttpTransactionFactory* http_transaction_factory);
75 HttpTransactionFactory* http_transaction_factory() {
76 return http_transaction_factory_.get();
77 }
66 void set_job_factory(URLRequestJobFactory* job_factory); 78 void set_job_factory(URLRequestJobFactory* job_factory);
67 void set_throttler_manager(URLRequestThrottlerManager* throttler_manager); 79 void set_throttler_manager(URLRequestThrottlerManager* throttler_manager);
68 void set_http_user_agent_settings( 80 void set_http_user_agent_settings(
69 HttpUserAgentSettings* http_user_agent_settings); 81 HttpUserAgentSettings* http_user_agent_settings);
70 void set_sdch_manager(scoped_ptr<SdchManager> sdch_manager); 82 void set_sdch_manager(scoped_ptr<SdchManager> sdch_manager);
71 83
72 private: 84 private:
73 // We use a raw pointer to prevent reference cycles, since 85 // We use a raw pointer to prevent reference cycles, since
74 // URLRequestContextStorage can often be contained within a URLRequestContext 86 // URLRequestContextStorage can often be contained within a URLRequestContext
75 // subclass. 87 // subclass.
(...skipping 20 matching lines...) Expand all
96 scoped_ptr<URLRequestJobFactory> job_factory_; 108 scoped_ptr<URLRequestJobFactory> job_factory_;
97 scoped_ptr<URLRequestThrottlerManager> throttler_manager_; 109 scoped_ptr<URLRequestThrottlerManager> throttler_manager_;
98 scoped_ptr<SdchManager> sdch_manager_; 110 scoped_ptr<SdchManager> sdch_manager_;
99 111
100 DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage); 112 DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage);
101 }; 113 };
102 114
103 } // namespace net 115 } // namespace net
104 116
105 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ 117 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_context_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698