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

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

Issue 355293003: Restrict QUIC session pool when channel ID is present. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments Created 6 years, 5 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_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/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 &random_generator_)); 198 &random_generator_));
199 writer_.reset(new QuicDefaultPacketWriter(socket)); 199 writer_.reset(new QuicDefaultPacketWriter(socket));
200 connection_ = new TestQuicConnection(SupportedVersions(GetParam()), 200 connection_ = new TestQuicConnection(SupportedVersions(GetParam()),
201 connection_id_, peer_addr_, 201 connection_id_, peer_addr_,
202 helper_.get(), writer_.get()); 202 helper_.get(), writer_.get());
203 connection_->set_visitor(&visitor_); 203 connection_->set_visitor(&visitor_);
204 connection_->SetSendAlgorithm(send_algorithm_); 204 connection_->SetSendAlgorithm(send_algorithm_);
205 connection_->SetReceiveAlgorithm(receive_algorithm_); 205 connection_->SetReceiveAlgorithm(receive_algorithm_);
206 crypto_config_.SetDefaults(); 206 crypto_config_.SetDefaults();
207 session_.reset( 207 session_.reset(
208 new QuicClientSession(connection_, 208 new QuicClientSession(host_port_pair_,
209 connection_,
209 scoped_ptr<DatagramClientSocket>(socket), 210 scoped_ptr<DatagramClientSocket>(socket),
210 writer_.Pass(), NULL, 211 writer_.Pass(), NULL,
211 &crypto_client_stream_factory_, 212 &crypto_client_stream_factory_,
212 make_scoped_ptr((QuicServerInfo*)NULL), 213 make_scoped_ptr((QuicServerInfo*)NULL),
213 QuicServerId(kServerHostname, kServerPort, 214 QuicServerId(kServerHostname, kServerPort,
214 false, PRIVACY_MODE_DISABLED), 215 false, PRIVACY_MODE_DISABLED),
215 DefaultQuicConfig(), &crypto_config_, 216 DefaultQuicConfig(), &crypto_config_,
216 base::MessageLoop::current()-> 217 base::MessageLoop::current()->
217 message_loop_proxy().get(), 218 message_loop_proxy().get(),
218 NULL)); 219 NULL));
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 least_unacked, !kIncludeCongestionFeedback); 282 least_unacked, !kIncludeCongestionFeedback);
282 } 283 }
283 284
284 BoundNetLog net_log_; 285 BoundNetLog net_log_;
285 bool use_closing_stream_; 286 bool use_closing_stream_;
286 MockSendAlgorithm* send_algorithm_; 287 MockSendAlgorithm* send_algorithm_;
287 TestReceiveAlgorithm* receive_algorithm_; 288 TestReceiveAlgorithm* receive_algorithm_;
288 scoped_refptr<TestTaskRunner> runner_; 289 scoped_refptr<TestTaskRunner> runner_;
289 scoped_ptr<MockWrite[]> mock_writes_; 290 scoped_ptr<MockWrite[]> mock_writes_;
290 MockClock clock_; 291 MockClock clock_;
292 const HostPortPair host_port_pair_;
wtc 2014/07/01 23:00:15 IMPORTANT: this is an empty string!
Ryan Hamilton 2014/07/01 23:26:20 Reverted this change.
291 TestQuicConnection* connection_; 293 TestQuicConnection* connection_;
292 scoped_ptr<QuicConnectionHelper> helper_; 294 scoped_ptr<QuicConnectionHelper> helper_;
293 testing::StrictMock<MockConnectionVisitor> visitor_; 295 testing::StrictMock<MockConnectionVisitor> visitor_;
294 scoped_ptr<QuicHttpStream> stream_; 296 scoped_ptr<QuicHttpStream> stream_;
295 scoped_ptr<QuicDefaultPacketWriter> writer_; 297 scoped_ptr<QuicDefaultPacketWriter> writer_;
296 scoped_ptr<QuicClientSession> session_; 298 scoped_ptr<QuicClientSession> session_;
297 QuicCryptoClientConfig crypto_config_; 299 QuicCryptoClientConfig crypto_config_;
298 TestCompletionCallback callback_; 300 TestCompletionCallback callback_;
299 HttpRequestInfo request_; 301 HttpRequestInfo request_;
300 HttpRequestHeaders headers_; 302 HttpRequestHeaders headers_;
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 // Set Delegate to NULL and make sure EffectivePriority returns highest 614 // Set Delegate to NULL and make sure EffectivePriority returns highest
613 // priority. 615 // priority.
614 reliable_stream->SetDelegate(NULL); 616 reliable_stream->SetDelegate(NULL);
615 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, 617 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority,
616 reliable_stream->EffectivePriority()); 618 reliable_stream->EffectivePriority());
617 reliable_stream->SetDelegate(delegate); 619 reliable_stream->SetDelegate(delegate);
618 } 620 }
619 621
620 } // namespace test 622 } // namespace test
621 } // namespace net 623 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698