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

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

Issue 1288383002: Use common code to set HttpNetworkSession::Param pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove check, http_cache_enabled_ || !channel_id_service. Created 5 years, 4 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
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
11 // populated with "sane" default values. Read through the comments to figure out 11 // populated with "sane" default values. Read through the comments to figure out
12 // what these are. 12 // what these are.
13 13
14 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 14 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
15 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 15 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
16 16
17 #include <string> 17 #include <string>
18 #include <vector> 18 #include <vector>
19 19
20 #include "base/basictypes.h" 20 #include "base/basictypes.h"
21 #include "base/files/file_path.h" 21 #include "base/files/file_path.h"
22 #include "base/memory/ref_counted.h" 22 #include "base/memory/ref_counted.h"
23 #include "base/memory/scoped_ptr.h" 23 #include "base/memory/scoped_ptr.h"
24 #include "base/memory/scoped_vector.h" 24 #include "base/memory/scoped_vector.h"
25 #include "build/build_config.h" 25 #include "build/build_config.h"
26 #include "net/base/net_export.h" 26 #include "net/base/net_export.h"
27 #include "net/base/network_delegate.h" 27 #include "net/base/network_delegate.h"
28 #include "net/dns/host_resolver.h" 28 #include "net/dns/host_resolver.h"
29 #include "net/http/http_network_session.h"
29 #include "net/proxy/proxy_config_service.h" 30 #include "net/proxy/proxy_config_service.h"
30 #include "net/proxy/proxy_service.h" 31 #include "net/proxy/proxy_service.h"
31 #include "net/quic/quic_protocol.h" 32 #include "net/quic/quic_protocol.h"
32 #include "net/socket/next_proto.h" 33 #include "net/socket/next_proto.h"
33 34
34 namespace base { 35 namespace base {
35 class SingleThreadTaskRunner; 36 class SingleThreadTaskRunner;
36 } 37 }
37 38
38 namespace net { 39 namespace net {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 uint16 testing_fixed_http_port; 80 uint16 testing_fixed_http_port;
80 uint16 testing_fixed_https_port; 81 uint16 testing_fixed_https_port;
81 NextProtoVector next_protos; 82 NextProtoVector next_protos;
82 std::string trusted_spdy_proxy; 83 std::string trusted_spdy_proxy;
83 bool use_alternate_protocols; 84 bool use_alternate_protocols;
84 bool enable_quic; 85 bool enable_quic;
85 bool enable_insecure_quic; 86 bool enable_insecure_quic;
86 QuicTagVector quic_connection_options; 87 QuicTagVector quic_connection_options;
87 }; 88 };
88 89
90 static void SetHttpNetworkSessionComponents(
91 HttpNetworkSession::Params* params,
92 URLRequestContext* context);
mmenke 2015/08/17 20:13:04 nit: Per google style guide, inputs should go bef
mmenke 2015/08/17 20:13:04 This should go after the constructor and destructo
wjmaclean 2015/08/18 14:17:23 Done.
wjmaclean 2015/08/18 14:17:23 Done. Sorry about that ... I thought static functi
93
89 URLRequestContextBuilder(); 94 URLRequestContextBuilder();
90 ~URLRequestContextBuilder(); 95 ~URLRequestContextBuilder();
91 96
92 // These functions are mutually exclusive. The ProxyConfigService, if 97 // These functions are mutually exclusive. The ProxyConfigService, if
93 // set, will be used to construct a ProxyService. 98 // set, will be used to construct a ProxyService.
94 void set_proxy_config_service(ProxyConfigService* proxy_config_service) { 99 void set_proxy_config_service(ProxyConfigService* proxy_config_service) {
95 proxy_config_service_.reset(proxy_config_service); 100 proxy_config_service_.reset(proxy_config_service);
96 } 101 }
97 void set_proxy_service(ProxyService* proxy_service) { 102 void set_proxy_service(ProxyService* proxy_service) {
98 proxy_service_.reset(proxy_service); 103 proxy_service_.reset(proxy_service);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 std::vector<SchemeFactory> extra_http_auth_handlers_; 270 std::vector<SchemeFactory> extra_http_auth_handlers_;
266 ScopedVector<URLRequestInterceptor> url_request_interceptors_; 271 ScopedVector<URLRequestInterceptor> url_request_interceptors_;
267 scoped_ptr<HttpServerProperties> http_server_properties_; 272 scoped_ptr<HttpServerProperties> http_server_properties_;
268 273
269 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); 274 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
270 }; 275 };
271 276
272 } // namespace net 277 } // namespace net
273 278
274 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 279 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698