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

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

Issue 734063004: Update from https://crrev.com/304418 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
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 // This class is useful for building a simple URLRequestContext. Most creators 5 // This class is useful for building a simple URLRequestContext. Most creators
6 // of new URLRequestContexts should use this helper class to construct it. Call 6 // of new URLRequestContexts should use this helper class to construct it. Call
7 // any configuration params, and when done, invoke Build() to construct the 7 // any configuration params, and when done, invoke Build() to construct the
8 // URLRequestContext. This URLRequestContext will own all its own storage. 8 // URLRequestContext. This URLRequestContext will own all its own storage.
9 // 9 //
10 // URLRequestContextBuilder and its associated params classes are initially 10 // URLRequestContextBuilder and its associated params classes are initially
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 void set_quic_connection_options( 167 void set_quic_connection_options(
168 const QuicTagVector& quic_connection_options) { 168 const QuicTagVector& quic_connection_options) {
169 http_network_session_params_.quic_connection_options = 169 http_network_session_params_.quic_connection_options =
170 quic_connection_options; 170 quic_connection_options;
171 } 171 }
172 172
173 void set_throttling_enabled(bool throttling_enabled) { 173 void set_throttling_enabled(bool throttling_enabled) {
174 throttling_enabled_ = throttling_enabled; 174 throttling_enabled_ = throttling_enabled;
175 } 175 }
176 176
177 void set_channel_id_enabled(bool enable) {
178 channel_id_enabled_ = enable;
179 }
180
177 URLRequestContext* Build(); 181 URLRequestContext* Build();
178 182
179 private: 183 private:
180 struct NET_EXPORT SchemeFactory { 184 struct NET_EXPORT SchemeFactory {
181 SchemeFactory(const std::string& scheme, 185 SchemeFactory(const std::string& scheme,
182 net::HttpAuthHandlerFactory* factory); 186 net::HttpAuthHandlerFactory* factory);
183 ~SchemeFactory(); 187 ~SchemeFactory();
184 188
185 std::string scheme; 189 std::string scheme;
186 net::HttpAuthHandlerFactory* factory; 190 net::HttpAuthHandlerFactory* factory;
187 }; 191 };
188 192
189 std::string accept_language_; 193 std::string accept_language_;
190 std::string user_agent_; 194 std::string user_agent_;
191 // Include support for data:// requests. 195 // Include support for data:// requests.
192 bool data_enabled_; 196 bool data_enabled_;
193 #if !defined(DISABLE_FILE_SUPPORT) 197 #if !defined(DISABLE_FILE_SUPPORT)
194 // Include support for file:// requests. 198 // Include support for file:// requests.
195 bool file_enabled_; 199 bool file_enabled_;
196 #endif 200 #endif
197 #if !defined(DISABLE_FTP_SUPPORT) 201 #if !defined(DISABLE_FTP_SUPPORT)
198 // Include support for ftp:// requests. 202 // Include support for ftp:// requests.
199 bool ftp_enabled_; 203 bool ftp_enabled_;
200 #endif 204 #endif
201 bool http_cache_enabled_; 205 bool http_cache_enabled_;
202 bool throttling_enabled_; 206 bool throttling_enabled_;
207 bool channel_id_enabled_;
203 208
204 HttpCacheParams http_cache_params_; 209 HttpCacheParams http_cache_params_;
205 HttpNetworkSessionParams http_network_session_params_; 210 HttpNetworkSessionParams http_network_session_params_;
206 base::FilePath transport_security_persister_path_; 211 base::FilePath transport_security_persister_path_;
207 scoped_ptr<NetLog> net_log_; 212 scoped_ptr<NetLog> net_log_;
208 scoped_ptr<HostResolver> host_resolver_; 213 scoped_ptr<HostResolver> host_resolver_;
209 scoped_ptr<ProxyConfigService> proxy_config_service_; 214 scoped_ptr<ProxyConfigService> proxy_config_service_;
210 scoped_ptr<ProxyService> proxy_service_; 215 scoped_ptr<ProxyService> proxy_service_;
211 scoped_ptr<NetworkDelegate> network_delegate_; 216 scoped_ptr<NetworkDelegate> network_delegate_;
212 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; 217 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_;
213 std::vector<SchemeFactory> extra_http_auth_handlers_; 218 std::vector<SchemeFactory> extra_http_auth_handlers_;
214 219
215 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); 220 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
216 }; 221 };
217 222
218 } // namespace net 223 } // namespace net
219 224
220 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 225 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
OLDNEW
« no previous file with comments | « net/url_request/test_url_fetcher_factory.cc ('k') | net/url_request/url_request_context_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698