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

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

Issue 2876243002: Add method to init HttpNetworkSession::Params from context bulder params (Closed)
Patch Set: Oops, base on top of trunk Created 3 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
« no previous file with comments | « no previous file | net/url_request/url_request_context_builder.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 // 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 int max_size; 81 int max_size;
82 82
83 // The cache path (when type is DISK). 83 // The cache path (when type is DISK).
84 base::FilePath path; 84 base::FilePath path;
85 }; 85 };
86 86
87 struct NET_EXPORT HttpNetworkSessionParams { 87 struct NET_EXPORT HttpNetworkSessionParams {
88 HttpNetworkSessionParams(); 88 HttpNetworkSessionParams();
89 ~HttpNetworkSessionParams(); 89 ~HttpNetworkSessionParams();
90 90
91 // Configutes |params| to match the settings in |this|.
92 // TODO(mmenke): Temporary utility function. Once everything is using a
93 // URLRequestContextBuilder, can make this no longer publicly accessible.
94 void ConfigureSessionParams(HttpNetworkSession::Params* params) const;
95
91 // These fields mirror those in HttpNetworkSession::Params; 96 // These fields mirror those in HttpNetworkSession::Params;
97 HostMappingRules* host_mapping_rules;
92 bool ignore_certificate_errors; 98 bool ignore_certificate_errors;
93 HostMappingRules* host_mapping_rules;
94 uint16_t testing_fixed_http_port; 99 uint16_t testing_fixed_http_port;
95 uint16_t testing_fixed_https_port; 100 uint16_t testing_fixed_https_port;
96 bool enable_http2; 101 bool enable_http2;
97 bool enable_quic; 102 bool enable_quic;
98 std::string quic_user_agent_id; 103 std::string quic_user_agent_id;
99 int quic_max_server_configs_stored_in_properties; 104 int quic_max_server_configs_stored_in_properties;
100 int quic_idle_connection_timeout_seconds;
101 QuicTagVector quic_connection_options; 105 QuicTagVector quic_connection_options;
102 bool quic_close_sessions_on_ip_change; 106 bool quic_close_sessions_on_ip_change;
107 int quic_idle_connection_timeout_seconds;
103 bool quic_migrate_sessions_on_network_change; 108 bool quic_migrate_sessions_on_network_change;
104 bool quic_migrate_sessions_early; 109 bool quic_migrate_sessions_early;
105 bool quic_disable_bidirectional_streams; 110 bool quic_disable_bidirectional_streams;
106 bool quic_race_cert_verification; 111 bool quic_race_cert_verification;
107 }; 112 };
108 113
109 URLRequestContextBuilder(); 114 URLRequestContextBuilder();
110 ~URLRequestContextBuilder(); 115 ~URLRequestContextBuilder();
111 116
112 // Sets a name for this URLRequestContext. Currently the name is used in 117 // Sets a name for this URLRequestContext. Currently the name is used in
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 // Not owned by the context builder. Once it is set to a non-null value, it 376 // Not owned by the context builder. Once it is set to a non-null value, it
372 // is guaranteed to be non-null during the lifetime of |this|. 377 // is guaranteed to be non-null during the lifetime of |this|.
373 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; 378 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_;
374 379
375 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); 380 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
376 }; 381 };
377 382
378 } // namespace net 383 } // namespace net
379 384
380 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 385 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
OLDNEW
« no previous file with comments | « no previous file | net/url_request/url_request_context_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698