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

Unified Diff: net/tools/quic/quic_dispatcher_test.cc

Issue 2453113002: Fix object-lifetime issues in async GetProof callpaths (Closed)
Patch Set: Updated patchset dependency Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/test_tools/mock_crypto_client_stream.cc ('k') | net/tools/quic/stateless_rejector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_dispatcher_test.cc
diff --git a/net/tools/quic/quic_dispatcher_test.cc b/net/tools/quic/quic_dispatcher_test.cc
index 62d7b4238d31829d814f991382f5d7b7bf61d9ea..f7f901c47c423d7bd1dc68995d75e15c54ac8763 100644
--- a/net/tools/quic/quic_dispatcher_test.cc
+++ b/net/tools/quic/quic_dispatcher_test.cc
@@ -1100,7 +1100,9 @@ class BufferedPacketStoreTest
public ::testing::WithParamInterface<BufferedPacketStoreTestParams> {
public:
BufferedPacketStoreTest()
- : QuicDispatcherTest(), client_addr_(Loopback4(), 1234) {
+ : QuicDispatcherTest(),
+ client_addr_(Loopback4(), 1234),
+ proof_(new QuicCryptoProof) {
FLAGS_quic_buffer_packet_till_chlo = true;
FLAGS_quic_use_cheap_stateless_rejects =
GetParam().support_cheap_stateless_reject;
@@ -1119,7 +1121,7 @@ class BufferedPacketStoreTest
// Pass an inchoate CHLO.
CryptoTestUtils::GenerateFullCHLO(
chlo, &crypto_config_, server_ip_, client_addr_, version, clock_,
- &proof_, QuicDispatcherPeer::GetCache(dispatcher_.get()), &full_chlo_);
+ proof_, QuicDispatcherPeer::GetCache(dispatcher_.get()), &full_chlo_);
}
string SerializeFullCHLO() {
@@ -1129,7 +1131,7 @@ class BufferedPacketStoreTest
protected:
IPAddress server_ip_;
IPEndPoint client_addr_;
- QuicCryptoProof proof_;
+ scoped_refptr<QuicCryptoProof> proof_;
const QuicClock* clock_;
CryptoHandshakeMessage full_chlo_;
};
@@ -1548,7 +1550,8 @@ class AsyncGetProofTest : public QuicDispatcherTest {
: QuicDispatcherTest(
std::unique_ptr<FakeProofSource>(new FakeProofSource())),
client_addr_(net::test::Loopback4(), 1234),
- crypto_config_peer_(&crypto_config_) {
+ crypto_config_peer_(&crypto_config_),
+ proof_(new QuicCryptoProof) {
FLAGS_enable_async_get_proof = true;
FLAGS_quic_buffer_packet_till_chlo = true;
FLAGS_enable_quic_stateless_reject_support = true;
@@ -1567,7 +1570,7 @@ class AsyncGetProofTest : public QuicDispatcherTest {
// Pass an inchoate CHLO.
CryptoTestUtils::GenerateFullCHLO(
chlo_, &crypto_config_, server_ip_, client_addr_, version, clock_,
- &proof_, QuicDispatcherPeer::GetCache(dispatcher_.get()), &full_chlo_);
+ proof_, QuicDispatcherPeer::GetCache(dispatcher_.get()), &full_chlo_);
GetFakeProofSource()->Activate();
}
@@ -1617,7 +1620,7 @@ class AsyncGetProofTest : public QuicDispatcherTest {
private:
QuicCryptoServerConfigPeer crypto_config_peer_;
IPAddress server_ip_;
- QuicCryptoProof proof_;
+ scoped_refptr<QuicCryptoProof> proof_;
const QuicClock* clock_;
CryptoHandshakeMessage chlo_;
CryptoHandshakeMessage full_chlo_;
« no previous file with comments | « net/quic/test_tools/mock_crypto_client_stream.cc ('k') | net/tools/quic/stateless_rejector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698