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

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

Issue 944883003: QUIC - Cache the connection type and connection description. Make the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments to Patch Set 5 Created 5 years, 9 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 | « net/quic/quic_connection_logger_unittest.cc ('k') | net/quic/quic_stream_factory.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_http_stream.h" 5 #include "net/quic/quic_http_stream.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "net/base/chunked_upload_data_stream.h" 9 #include "net/base/chunked_upload_data_stream.h"
10 #include "net/base/elements_upload_data_stream.h" 10 #include "net/base/elements_upload_data_stream.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 Return(QuicBandwidth::Zero())); 199 Return(QuicBandwidth::Zero()));
200 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _, _)).Times(AnyNumber()); 200 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _, _)).Times(AnyNumber());
201 helper_.reset(new QuicConnectionHelper(runner_.get(), &clock_, 201 helper_.reset(new QuicConnectionHelper(runner_.get(), &clock_,
202 &random_generator_)); 202 &random_generator_));
203 TestPacketWriterFactory writer_factory(socket); 203 TestPacketWriterFactory writer_factory(socket);
204 connection_ = new TestQuicConnection(SupportedVersions(GetParam()), 204 connection_ = new TestQuicConnection(SupportedVersions(GetParam()),
205 connection_id_, peer_addr_, 205 connection_id_, peer_addr_,
206 helper_.get(), writer_factory); 206 helper_.get(), writer_factory);
207 connection_->set_visitor(&visitor_); 207 connection_->set_visitor(&visitor_);
208 connection_->SetSendAlgorithm(send_algorithm_); 208 connection_->SetSendAlgorithm(send_algorithm_);
209 session_.reset( 209 session_.reset(new QuicClientSession(
210 new QuicClientSession(connection_, 210 connection_, scoped_ptr<DatagramClientSocket>(socket), nullptr,
211 scoped_ptr<DatagramClientSocket>(socket), 211 &transport_security_state_, make_scoped_ptr((QuicServerInfo*)nullptr),
212 nullptr, 212 DefaultQuicConfig(), "CONNECTION_UNKNOWN",
213 &transport_security_state_, 213 base::MessageLoop::current()->message_loop_proxy().get(), nullptr));
214 make_scoped_ptr((QuicServerInfo*)nullptr),
215 DefaultQuicConfig(),
216 base::MessageLoop::current()->
217 message_loop_proxy().get(),
218 nullptr));
219 session_->InitializeSession(QuicServerId(kServerHostname, kServerPort, 214 session_->InitializeSession(QuicServerId(kServerHostname, kServerPort,
220 /*is_secure=*/false, 215 /*is_secure=*/false,
221 PRIVACY_MODE_DISABLED), 216 PRIVACY_MODE_DISABLED),
222 &crypto_config_, 217 &crypto_config_,
223 &crypto_client_stream_factory_); 218 &crypto_client_stream_factory_);
224 session_->GetCryptoStream()->CryptoConnect(); 219 session_->GetCryptoStream()->CryptoConnect();
225 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed()); 220 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed());
226 stream_.reset(use_closing_stream_ ? 221 stream_.reset(use_closing_stream_ ?
227 new AutoClosingStream(session_->GetWeakPtr()) : 222 new AutoClosingStream(session_->GetWeakPtr()) :
228 new QuicHttpStream(session_->GetWeakPtr())); 223 new QuicHttpStream(session_->GetWeakPtr()));
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 // Set Delegate to nullptr and make sure EffectivePriority returns highest 752 // Set Delegate to nullptr and make sure EffectivePriority returns highest
758 // priority. 753 // priority.
759 reliable_stream->SetDelegate(nullptr); 754 reliable_stream->SetDelegate(nullptr);
760 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, 755 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority,
761 reliable_stream->EffectivePriority()); 756 reliable_stream->EffectivePriority());
762 reliable_stream->SetDelegate(delegate); 757 reliable_stream->SetDelegate(delegate);
763 } 758 }
764 759
765 } // namespace test 760 } // namespace test
766 } // namespace net 761 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_logger_unittest.cc ('k') | net/quic/quic_stream_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698