| Index: net/quic/quic_stream_factory.cc
|
| diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
|
| index e98f0acdf1103c069d016aeb8e105faa854b8d1c..5bbe5cf517d148f5f89c0f6309448507cec5bd45 100644
|
| --- a/net/quic/quic_stream_factory.cc
|
| +++ b/net/quic/quic_stream_factory.cc
|
| @@ -76,7 +76,6 @@
|
| HostResolver* host_resolver,
|
| const HostPortPair& host_port_pair,
|
| bool is_https,
|
| - PrivacyMode privacy_mode,
|
| base::StringPiece method,
|
| QuicServerInfo* server_info,
|
| const BoundNetLog& net_log);
|
| @@ -117,6 +116,7 @@
|
|
|
| QuicStreamFactory* factory_;
|
| SingleRequestHostResolver host_resolver_;
|
| + bool is_https_;
|
| QuicSessionKey session_key_;
|
| bool is_post_;
|
| scoped_ptr<QuicServerInfo> server_info_;
|
| @@ -133,13 +133,13 @@
|
| HostResolver* host_resolver,
|
| const HostPortPair& host_port_pair,
|
| bool is_https,
|
| - PrivacyMode privacy_mode,
|
| base::StringPiece method,
|
| QuicServerInfo* server_info,
|
| const BoundNetLog& net_log)
|
| : factory_(factory),
|
| host_resolver_(host_resolver),
|
| - session_key_(host_port_pair, is_https, privacy_mode),
|
| + is_https_(is_https),
|
| + session_key_(host_port_pair, is_https),
|
| is_post_(method == "POST"),
|
| server_info_(server_info),
|
| net_log_(net_log),
|
| @@ -261,8 +261,9 @@
|
| int QuicStreamFactory::Job::DoConnect() {
|
| io_state_ = STATE_CONNECT_COMPLETE;
|
|
|
| - int rv = factory_->CreateSession(session_key_, server_info_.Pass(),
|
| - address_list_, net_log_, &session_);
|
| + int rv = factory_->CreateSession(session_key_.host_port_pair(), is_https_,
|
| + server_info_.Pass(), address_list_,
|
| + net_log_, &session_);
|
| if (rv != OK) {
|
| DCHECK(rv != ERR_IO_PENDING);
|
| DCHECK(!session_);
|
| @@ -274,7 +275,7 @@
|
| return ERR_QUIC_PROTOCOL_ERROR;
|
| }
|
| rv = session_->CryptoConnect(
|
| - factory_->require_confirmation() || session_key_.is_https(),
|
| + factory_->require_confirmation() || is_https_,
|
| base::Bind(&QuicStreamFactory::Job::OnIOComplete,
|
| base::Unretained(this)));
|
| return rv;
|
| @@ -309,15 +310,13 @@
|
|
|
| int QuicStreamRequest::Request(const HostPortPair& host_port_pair,
|
| bool is_https,
|
| - PrivacyMode privacy_mode,
|
| base::StringPiece method,
|
| const BoundNetLog& net_log,
|
| const CompletionCallback& callback) {
|
| DCHECK(!stream_);
|
| DCHECK(callback_.is_null());
|
| DCHECK(factory_);
|
| - int rv = factory_->Create(host_port_pair, is_https, privacy_mode, method,
|
| - net_log, this);
|
| + int rv = factory_->Create(host_port_pair, is_https, method, net_log, this);
|
| if (rv == ERR_IO_PENDING) {
|
| host_port_pair_ = host_port_pair;
|
| is_https_ = is_https;
|
| @@ -393,11 +392,10 @@
|
|
|
| int QuicStreamFactory::Create(const HostPortPair& host_port_pair,
|
| bool is_https,
|
| - PrivacyMode privacy_mode,
|
| base::StringPiece method,
|
| const BoundNetLog& net_log,
|
| QuicStreamRequest* request) {
|
| - QuicSessionKey session_key(host_port_pair, is_https, privacy_mode);
|
| + QuicSessionKey session_key(host_port_pair, is_https);
|
| if (HasActiveSession(session_key)) {
|
| request->set_stream(CreateIfSessionExists(session_key, net_log));
|
| return OK;
|
| @@ -419,8 +417,8 @@
|
| quic_server_info = quic_server_info_factory_->GetForServer(session_key);
|
| }
|
| }
|
| - scoped_ptr<Job> job(new Job(this, host_resolver_, host_port_pair, is_https,
|
| - privacy_mode, method, quic_server_info, net_log));
|
| + scoped_ptr<Job> job(new Job(this, host_resolver_, host_port_pair,
|
| + is_https, method, quic_server_info, net_log));
|
| int rv = job->Run(base::Bind(&QuicStreamFactory::OnJobComplete,
|
| base::Unretained(this), job.get()));
|
|
|
| @@ -643,12 +641,14 @@
|
| }
|
|
|
| int QuicStreamFactory::CreateSession(
|
| - const QuicSessionKey& session_key,
|
| + const HostPortPair& host_port_pair,
|
| + bool is_https,
|
| scoped_ptr<QuicServerInfo> server_info,
|
| const AddressList& address_list,
|
| const BoundNetLog& net_log,
|
| QuicClientSession** session) {
|
| bool enable_port_selection = enable_port_selection_;
|
| + QuicSessionKey session_key(host_port_pair, is_https);
|
| if (enable_port_selection &&
|
| ContainsKey(gone_away_aliases_, session_key)) {
|
| // Disable port selection when the server is going away.
|
| @@ -661,7 +661,7 @@
|
| QuicConnectionId connection_id = random_generator_->RandUint64();
|
| IPEndPoint addr = *address_list.begin();
|
| scoped_refptr<PortSuggester> port_suggester =
|
| - new PortSuggester(session_key.host_port_pair(), port_seed_);
|
| + new PortSuggester(host_port_pair, port_seed_);
|
| DatagramSocket::BindType bind_type = enable_port_selection ?
|
| DatagramSocket::RANDOM_BIND : // Use our callback.
|
| DatagramSocket::DEFAULT_BIND; // Use OS to randomize.
|
| @@ -713,8 +713,7 @@
|
| QuicConfig config = config_;
|
| if (http_server_properties_) {
|
| const HttpServerProperties::NetworkStats* stats =
|
| - http_server_properties_->GetServerNetworkStats(
|
| - session_key.host_port_pair());
|
| + http_server_properties_->GetServerNetworkStats(host_port_pair);
|
| if (stats != NULL) {
|
| config.set_initial_round_trip_time_us(stats->rtt.InMicroseconds(),
|
| stats->rtt.InMicroseconds());
|
|
|