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

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

Issue 1504383002: Remove ScopedVector from url_request_context_builder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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"
25 #include "build/build_config.h" 24 #include "build/build_config.h"
26 #include "net/base/net_export.h" 25 #include "net/base/net_export.h"
27 #include "net/base/network_delegate.h" 26 #include "net/base/network_delegate.h"
28 #include "net/dns/host_resolver.h" 27 #include "net/dns/host_resolver.h"
29 #include "net/http/http_network_session.h" 28 #include "net/http/http_network_session.h"
30 #include "net/proxy/proxy_config_service.h" 29 #include "net/proxy/proxy_config_service.h"
31 #include "net/proxy/proxy_service.h" 30 #include "net/proxy/proxy_service.h"
32 #include "net/quic/quic_protocol.h" 31 #include "net/quic/quic_protocol.h"
33 #include "net/socket/next_proto.h" 32 #include "net/socket/next_proto.h"
34 33
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 throttling_enabled_ = throttling_enabled; 220 throttling_enabled_ = throttling_enabled;
222 } 221 }
223 222
224 void set_backoff_enabled(bool backoff_enabled) { 223 void set_backoff_enabled(bool backoff_enabled) {
225 backoff_enabled_ = backoff_enabled; 224 backoff_enabled_ = backoff_enabled;
226 } 225 }
227 226
228 void SetCertVerifier(scoped_ptr<CertVerifier> cert_verifier); 227 void SetCertVerifier(scoped_ptr<CertVerifier> cert_verifier);
229 228
230 void SetInterceptors( 229 void SetInterceptors(
231 ScopedVector<URLRequestInterceptor> url_request_interceptors); 230 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors);
232 231
233 // Override the default in-memory cookie store and channel id service. 232 // Override the default in-memory cookie store and channel id service.
234 // |cookie_store| must not be NULL. |channel_id_service| may be NULL to 233 // |cookie_store| must not be NULL. |channel_id_service| may be NULL to
235 // disable channel id for this context. 234 // disable channel id for this context.
236 // Note that a persistent cookie store should not be used with an in-memory 235 // Note that a persistent cookie store should not be used with an in-memory
237 // channel id service, and one cookie store should not be shared between 236 // channel id service, and one cookie store should not be shared between
238 // multiple channel-id stores (or used both with and without a channel id 237 // multiple channel-id stores (or used both with and without a channel id
239 // store). 238 // store).
240 void SetCookieAndChannelIdStores( 239 void SetCookieAndChannelIdStores(
241 const scoped_refptr<CookieStore>& cookie_store, 240 const scoped_refptr<CookieStore>& cookie_store,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 NetLog* net_log_; 292 NetLog* net_log_;
294 scoped_ptr<HostResolver> host_resolver_; 293 scoped_ptr<HostResolver> host_resolver_;
295 scoped_ptr<ChannelIDService> channel_id_service_; 294 scoped_ptr<ChannelIDService> channel_id_service_;
296 scoped_ptr<ProxyConfigService> proxy_config_service_; 295 scoped_ptr<ProxyConfigService> proxy_config_service_;
297 scoped_ptr<ProxyService> proxy_service_; 296 scoped_ptr<ProxyService> proxy_service_;
298 scoped_ptr<NetworkDelegate> network_delegate_; 297 scoped_ptr<NetworkDelegate> network_delegate_;
299 scoped_refptr<CookieStore> cookie_store_; 298 scoped_refptr<CookieStore> cookie_store_;
300 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; 299 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_;
301 std::vector<SchemeFactory> extra_http_auth_handlers_; 300 std::vector<SchemeFactory> extra_http_auth_handlers_;
302 scoped_ptr<CertVerifier> cert_verifier_; 301 scoped_ptr<CertVerifier> cert_verifier_;
303 ScopedVector<URLRequestInterceptor> url_request_interceptors_; 302 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_;
304 scoped_ptr<HttpServerProperties> http_server_properties_; 303 scoped_ptr<HttpServerProperties> http_server_properties_;
305 304
306 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); 305 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
307 }; 306 };
308 307
309 } // namespace net 308 } // namespace net
310 309
311 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 310 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698