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: trunk/src/net/quic/quic_stream_factory.cc

Issue 483043002: Revert 289433 "Refactor pooling logic into a helper method" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 | Annotate | Revision Log
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/quic/quic_stream_factory.h" 5 #include "net/quic/quic_stream_factory.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/cpu.h" 9 #include "base/cpu.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 const HttpServerProperties::NetworkStats* stats = 852 const HttpServerProperties::NetworkStats* stats =
853 http_server_properties_->GetServerNetworkStats( 853 http_server_properties_->GetServerNetworkStats(
854 server_id.host_port_pair()); 854 server_id.host_port_pair());
855 if (stats != NULL) { 855 if (stats != NULL) {
856 config.SetInitialRoundTripTimeUsToSend(stats->srtt.InMicroseconds()); 856 config.SetInitialRoundTripTimeUsToSend(stats->srtt.InMicroseconds());
857 } 857 }
858 } 858 }
859 859
860 *session = new QuicClientSession( 860 *session = new QuicClientSession(
861 connection, socket.Pass(), writer.Pass(), this, 861 connection, socket.Pass(), writer.Pass(), this,
862 quic_crypto_client_stream_factory_, transport_security_state_, 862 quic_crypto_client_stream_factory_, server_info.Pass(), server_id,
863 server_info.Pass(), server_id, config, &crypto_config_, 863 config, &crypto_config_,
864 base::MessageLoop::current()->message_loop_proxy().get(), 864 base::MessageLoop::current()->message_loop_proxy().get(),
865 net_log.net_log()); 865 net_log.net_log());
866 (*session)->InitializeSession(); 866 (*session)->InitializeSession();
867 all_sessions_[*session] = server_id; // owning pointer 867 all_sessions_[*session] = server_id; // owning pointer
868 return OK; 868 return OK;
869 } 869 }
870 870
871 bool QuicStreamFactory::HasActiveJob(const QuicServerId& key) const { 871 bool QuicStreamFactory::HasActiveJob(const QuicServerId& key) const {
872 return ContainsKey(active_jobs_, key); 872 return ContainsKey(active_jobs_, key);
873 } 873 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 http_server_properties_->ClearAlternateProtocol(server); 958 http_server_properties_->ClearAlternateProtocol(server);
959 http_server_properties_->SetAlternateProtocol( 959 http_server_properties_->SetAlternateProtocol(
960 server, alternate.port, alternate.protocol, 1); 960 server, alternate.port, alternate.protocol, 1);
961 DCHECK_EQ(QUIC, 961 DCHECK_EQ(QUIC,
962 http_server_properties_->GetAlternateProtocol(server).protocol); 962 http_server_properties_->GetAlternateProtocol(server).protocol);
963 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( 963 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken(
964 server)); 964 server));
965 } 965 }
966 966
967 } // namespace net 967 } // namespace net
OLDNEW
« no previous file with comments | « trunk/src/net/quic/quic_stream_factory.h ('k') | trunk/src/net/quic/quic_stream_factory_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698