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

Unified Diff: net/tools/quic/test_tools/quic_test_client.cc

Issue 2580393003: Replace QuicAckListenerInterface* with scoped_refptr<QuicAckListenerInterface>. (Closed)
Patch Set: Created 4 years 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/tools/quic/test_tools/quic_test_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/quic_test_client.cc
diff --git a/net/tools/quic/test_tools/quic_test_client.cc b/net/tools/quic/test_tools/quic_test_client.cc
index 5e06f89e0eb7fa4670b222b3f88a7cada4ef405b..367008b9d36917a6b72d2c95594155e91952b922 100644
--- a/net/tools/quic/test_tools/quic_test_client.cc
+++ b/net/tools/quic/test_tools/quic_test_client.cc
@@ -292,7 +292,7 @@ ssize_t QuicTestClient::GetOrCreateStreamAndSendRequest(
const SpdyHeaderBlock* headers,
StringPiece body,
bool fin,
- QuicAckListenerInterface* delegate) {
+ const scoped_refptr<QuicAckListenerInterface>& delegate) {
if (headers) {
QuicClientPushPromiseIndex::TryHandle* handle;
QuicAsyncStatus rv =
@@ -374,9 +374,10 @@ ssize_t QuicTestClient::SendData(const string& data, bool last_data) {
return SendData(data, last_data, nullptr);
}
-ssize_t QuicTestClient::SendData(const string& data,
- bool last_data,
- QuicAckListenerInterface* delegate) {
+ssize_t QuicTestClient::SendData(
+ const string& data,
+ bool last_data,
+ const scoped_refptr<QuicAckListenerInterface>& delegate) {
return GetOrCreateStreamAndSendRequest(nullptr, StringPiece(data), last_data,
delegate);
}
@@ -671,6 +672,18 @@ void QuicTestClient::WaitForWriteToFlush() {
}
}
+QuicTestClient::TestClientDataToResend::TestClientDataToResend(
+ std::unique_ptr<SpdyHeaderBlock> headers,
+ base::StringPiece body,
+ bool fin,
+ QuicTestClient* test_client,
+ const scoped_refptr<QuicAckListenerInterface>& delegate)
+ : QuicClient::QuicDataToResend(std::move(headers), body, fin),
+ test_client_(test_client),
+ delegate_(delegate) {}
+
+QuicTestClient::TestClientDataToResend::~TestClientDataToResend() {}
+
void QuicTestClient::TestClientDataToResend::Resend() {
test_client_->GetOrCreateStreamAndSendRequest(headers_.get(), body_, fin_,
delegate_);
« no previous file with comments | « net/tools/quic/test_tools/quic_test_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698