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

Side by Side Diff: net/quic/core/quic_server_session_base_test.cc

Issue 2823223003: Rename QuicSession::GetCryptoStream() to GetMutableCryptoStream(). Add a const GetCryptoStream(). M… (Closed)
Patch Set: Created 3 years, 8 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/core/quic_server_session_base.cc ('k') | net/quic/core/quic_session.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/core/quic_server_session_base.h" 5 #include "net/quic/core/quic_server_session_base.h"
6 6
7 #include <cstdint> 7 #include <cstdint>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 QuicConfigPeer::SetReceivedConnectionOptions(session_->config(), copt); 506 QuicConfigPeer::SetReceivedConnectionOptions(session_->config(), copt);
507 507
508 const string kTestServingRegion = "a serving region"; 508 const string kTestServingRegion = "a serving region";
509 session_->set_serving_region(kTestServingRegion); 509 session_->set_serving_region(kTestServingRegion);
510 510
511 // Set the time to be one hour + one second from the 0 baseline. 511 // Set the time to be one hour + one second from the 0 baseline.
512 connection_->AdvanceTime( 512 connection_->AdvanceTime(
513 QuicTime::Delta::FromSeconds(kNumSecondsPerHour + 1)); 513 QuicTime::Delta::FromSeconds(kNumSecondsPerHour + 1));
514 514
515 QuicCryptoServerStream* crypto_stream = static_cast<QuicCryptoServerStream*>( 515 QuicCryptoServerStream* crypto_stream = static_cast<QuicCryptoServerStream*>(
516 QuicSessionPeer::GetCryptoStream(session_.get())); 516 QuicSessionPeer::GetMutableCryptoStream(session_.get()));
517 517
518 // No effect if no CachedNetworkParameters provided. 518 // No effect if no CachedNetworkParameters provided.
519 EXPECT_CALL(*connection_, ResumeConnectionState(_, _)).Times(0); 519 EXPECT_CALL(*connection_, ResumeConnectionState(_, _)).Times(0);
520 session_->OnConfigNegotiated(); 520 session_->OnConfigNegotiated();
521 521
522 // No effect if CachedNetworkParameters provided, but different serving 522 // No effect if CachedNetworkParameters provided, but different serving
523 // regions. 523 // regions.
524 CachedNetworkParameters cached_network_params; 524 CachedNetworkParameters cached_network_params;
525 cached_network_params.set_bandwidth_estimate_bytes_per_second(1); 525 cached_network_params.set_bandwidth_estimate_bytes_per_second(1);
526 cached_network_params.set_serving_region("different serving region"); 526 cached_network_params.set_serving_region("different serving region");
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 633
634 // Allow the async ProofSource::GetProof call to complete. Verify (under 634 // Allow the async ProofSource::GetProof call to complete. Verify (under
635 // asan) that this does not result in accesses to any freed memory from the 635 // asan) that this does not result in accesses to any freed memory from the
636 // session or its subobjects. 636 // session or its subobjects.
637 GetFakeProofSource()->InvokePendingCallback(0); 637 GetFakeProofSource()->InvokePendingCallback(0);
638 } 638 }
639 639
640 } // namespace 640 } // namespace
641 } // namespace test 641 } // namespace test
642 } // namespace net 642 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_server_session_base.cc ('k') | net/quic/core/quic_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698