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

Side by Side Diff: net/quic/quic_stream_factory.cc

Issue 330333006: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linus_tsan error - reverted the change to ConnectionMigrationClientPortChanged unitttest Created 6 years, 6 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
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/quic/reliable_quic_stream.h » ('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 #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 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 false, supported_versions_); 827 false, supported_versions_);
828 writer->SetConnection(connection); 828 writer->SetConnection(connection);
829 connection->set_max_packet_length(max_packet_length_); 829 connection->set_max_packet_length(max_packet_length_);
830 830
831 InitializeCachedStateInCryptoConfig(server_id, server_info); 831 InitializeCachedStateInCryptoConfig(server_id, server_info);
832 832
833 QuicConfig config = config_; 833 QuicConfig config = config_;
834 config.SetInitialCongestionWindowToSend( 834 config.SetInitialCongestionWindowToSend(
835 server_id.is_https() ? kServerSecureInitialCongestionWindow 835 server_id.is_https() ? kServerSecureInitialCongestionWindow
836 : kServerInecureInitialCongestionWindow); 836 : kServerInecureInitialCongestionWindow);
837 config.SetInitialFlowControlWindowToSend(kInitialReceiveWindowSize);
837 if (http_server_properties_) { 838 if (http_server_properties_) {
838 const HttpServerProperties::NetworkStats* stats = 839 const HttpServerProperties::NetworkStats* stats =
839 http_server_properties_->GetServerNetworkStats( 840 http_server_properties_->GetServerNetworkStats(
840 server_id.host_port_pair()); 841 server_id.host_port_pair());
841 if (stats != NULL) { 842 if (stats != NULL) {
842 config.SetInitialRoundTripTimeUsToSend(stats->srtt.InMicroseconds()); 843 config.SetInitialRoundTripTimeUsToSend(stats->srtt.InMicroseconds());
843 } 844 }
844 } 845 }
845 846
846 *session = new QuicClientSession( 847 *session = new QuicClientSession(
847 connection, socket.Pass(), writer.Pass(), this, 848 connection, socket.Pass(), writer.Pass(), this,
848 quic_crypto_client_stream_factory_, server_info.Pass(), server_id, 849 quic_crypto_client_stream_factory_, server_info.Pass(), server_id,
849 config, kInitialReceiveWindowSize, &crypto_config_, 850 config, &crypto_config_,
850 base::MessageLoop::current()->message_loop_proxy().get(), 851 base::MessageLoop::current()->message_loop_proxy().get(),
851 net_log.net_log()); 852 net_log.net_log());
852 all_sessions_[*session] = server_id; // owning pointer 853 all_sessions_[*session] = server_id; // owning pointer
853 return OK; 854 return OK;
854 } 855 }
855 856
856 bool QuicStreamFactory::HasActiveJob(const QuicServerId& key) const { 857 bool QuicStreamFactory::HasActiveJob(const QuicServerId& key) const {
857 return ContainsKey(active_jobs_, key); 858 return ContainsKey(active_jobs_, key);
858 } 859 }
859 860
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 http_server_properties_->ClearAlternateProtocol(server); 944 http_server_properties_->ClearAlternateProtocol(server);
944 http_server_properties_->SetAlternateProtocol( 945 http_server_properties_->SetAlternateProtocol(
945 server, alternate.port, alternate.protocol); 946 server, alternate.port, alternate.protocol);
946 DCHECK_EQ(QUIC, 947 DCHECK_EQ(QUIC,
947 http_server_properties_->GetAlternateProtocol(server).protocol); 948 http_server_properties_->GetAlternateProtocol(server).protocol);
948 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( 949 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken(
949 server)); 950 server));
950 } 951 }
951 952
952 } // namespace net 953 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/quic/reliable_quic_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698