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

Side by Side Diff: net/http/http_network_session.cc

Issue 903213003: Enable QUIC for proxies based on Finch config and command line switch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Ben's comments Created 5 years, 10 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 #include "net/http/http_network_session.h" 5 #include "net/http/http_network_session.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/debug/stack_trace.h" 10 #include "base/debug/stack_trace.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 spdy_default_protocol(kProtoUnknown), 78 spdy_default_protocol(kProtoUnknown),
79 spdy_stream_initial_recv_window_size(0), 79 spdy_stream_initial_recv_window_size(0),
80 spdy_initial_max_concurrent_streams(0), 80 spdy_initial_max_concurrent_streams(0),
81 spdy_max_concurrent_streams_limit(0), 81 spdy_max_concurrent_streams_limit(0),
82 time_func(&base::TimeTicks::Now), 82 time_func(&base::TimeTicks::Now),
83 force_spdy_over_ssl(true), 83 force_spdy_over_ssl(true),
84 force_spdy_always(false), 84 force_spdy_always(false),
85 use_alternate_protocols(false), 85 use_alternate_protocols(false),
86 alternate_protocol_probability_threshold(1), 86 alternate_protocol_probability_threshold(1),
87 enable_quic(false), 87 enable_quic(false),
88 enable_quic_for_proxies(false),
88 enable_quic_port_selection(true), 89 enable_quic_port_selection(true),
89 quic_always_require_handshake_confirmation(false), 90 quic_always_require_handshake_confirmation(false),
90 quic_disable_connection_pooling(false), 91 quic_disable_connection_pooling(false),
91 quic_load_server_info_timeout_ms(0), 92 quic_load_server_info_timeout_ms(0),
92 quic_load_server_info_timeout_srtt_multiplier(0.0f), 93 quic_load_server_info_timeout_srtt_multiplier(0.0f),
93 quic_enable_truncated_connection_ids(false), 94 quic_enable_truncated_connection_ids(false),
94 quic_clock(NULL), 95 quic_clock(NULL),
95 quic_random(NULL), 96 quic_random(NULL),
96 quic_max_packet_length(kDefaultMaxPacketSize), 97 quic_max_packet_length(kDefaultMaxPacketSize),
97 enable_user_alternate_protocol_ports(false), 98 enable_user_alternate_protocol_ports(false),
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 248 }
248 249
249 base::Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const { 250 base::Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const {
250 return spdy_session_pool_.SpdySessionPoolInfoToValue(); 251 return spdy_session_pool_.SpdySessionPoolInfoToValue();
251 } 252 }
252 253
253 base::Value* HttpNetworkSession::QuicInfoToValue() const { 254 base::Value* HttpNetworkSession::QuicInfoToValue() const {
254 base::DictionaryValue* dict = new base::DictionaryValue(); 255 base::DictionaryValue* dict = new base::DictionaryValue();
255 dict->Set("sessions", quic_stream_factory_.QuicStreamFactoryInfoToValue()); 256 dict->Set("sessions", quic_stream_factory_.QuicStreamFactoryInfoToValue());
256 dict->SetBoolean("quic_enabled", params_.enable_quic); 257 dict->SetBoolean("quic_enabled", params_.enable_quic);
258 dict->SetBoolean("quic_enabled_for_proxies", params_.enable_quic_for_proxies);
257 dict->SetBoolean("enable_quic_port_selection", 259 dict->SetBoolean("enable_quic_port_selection",
258 params_.enable_quic_port_selection); 260 params_.enable_quic_port_selection);
259 base::ListValue* connection_options = new base::ListValue; 261 base::ListValue* connection_options = new base::ListValue;
260 for (QuicTagVector::const_iterator it = 262 for (QuicTagVector::const_iterator it =
261 params_.quic_connection_options.begin(); 263 params_.quic_connection_options.begin();
262 it != params_.quic_connection_options.end(); ++it) { 264 it != params_.quic_connection_options.end(); ++it) {
263 connection_options->AppendString("'" + QuicUtils::TagToString(*it) + "'"); 265 connection_options->AppendString("'" + QuicUtils::TagToString(*it) + "'");
264 } 266 }
265 dict->Set("connection_options", connection_options); 267 dict->Set("connection_options", connection_options);
266 dict->SetString("origin_to_force_quic_on", 268 dict->SetString("origin_to_force_quic_on",
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 case WEBSOCKET_SOCKET_POOL: 313 case WEBSOCKET_SOCKET_POOL:
312 return websocket_socket_pool_manager_.get(); 314 return websocket_socket_pool_manager_.get();
313 default: 315 default:
314 NOTREACHED(); 316 NOTREACHED();
315 break; 317 break;
316 } 318 }
317 return NULL; 319 return NULL;
318 } 320 }
319 321
320 } // namespace net 322 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698