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

Side by Side Diff: net/tools/quic/quic_dispatcher_test.cc

Issue 2226643004: QuicSession no longer directly owns its QuicConnection. Not flag protected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@129226757
Patch Set: Created 4 years, 4 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/tools/quic/quic_client_session.h ('k') | net/tools/quic/quic_simple_server_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 (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/tools/quic/quic_dispatcher.h" 5 #include "net/tools/quic/quic_dispatcher.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <ostream> 8 #include <ostream>
9 #include <string> 9 #include <string>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 QuicConnection* connection, 54 QuicConnection* connection,
55 const QuicCryptoServerConfig* crypto_config, 55 const QuicCryptoServerConfig* crypto_config,
56 QuicCompressedCertsCache* compressed_certs_cache) 56 QuicCompressedCertsCache* compressed_certs_cache)
57 : QuicServerSessionBase(config, 57 : QuicServerSessionBase(config,
58 connection, 58 connection,
59 nullptr, 59 nullptr,
60 nullptr, 60 nullptr,
61 crypto_config, 61 crypto_config,
62 compressed_certs_cache), 62 compressed_certs_cache),
63 crypto_stream_(QuicServerSessionBase::GetCryptoStream()) {} 63 crypto_stream_(QuicServerSessionBase::GetCryptoStream()) {}
64 ~TestQuicSpdyServerSession() override{}; 64
65 ~TestQuicSpdyServerSession() override { delete connection(); };
65 66
66 MOCK_METHOD3(OnConnectionClosed, 67 MOCK_METHOD3(OnConnectionClosed,
67 void(QuicErrorCode error, 68 void(QuicErrorCode error,
68 const string& error_details, 69 const string& error_details,
69 ConnectionCloseSource source)); 70 ConnectionCloseSource source));
70 MOCK_METHOD1(CreateIncomingDynamicStream, QuicSpdyStream*(QuicStreamId id)); 71 MOCK_METHOD1(CreateIncomingDynamicStream, QuicSpdyStream*(QuicStreamId id));
71 MOCK_METHOD1(CreateOutgoingDynamicStream, 72 MOCK_METHOD1(CreateOutgoingDynamicStream,
72 QuicSpdyStream*(SpdyPriority priority)); 73 QuicSpdyStream*(SpdyPriority priority));
73 74
74 QuicCryptoServerStreamBase* CreateQuicCryptoServerStream( 75 QuicCryptoServerStreamBase* CreateQuicCryptoServerStream(
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 928
928 // And we'll resume where we left off when we get another call. 929 // And we'll resume where we left off when we get another call.
929 EXPECT_CALL(*connection2(), OnCanWrite()); 930 EXPECT_CALL(*connection2(), OnCanWrite());
930 dispatcher_->OnCanWrite(); 931 dispatcher_->OnCanWrite();
931 EXPECT_FALSE(dispatcher_->HasPendingWrites()); 932 EXPECT_FALSE(dispatcher_->HasPendingWrites());
932 } 933 }
933 934
934 } // namespace 935 } // namespace
935 } // namespace test 936 } // namespace test
936 } // namespace net 937 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client_session.h ('k') | net/tools/quic/quic_simple_server_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698