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

Unified Diff: net/quic/chromium/quic_chromium_packet_writer.h

Issue 2319343004: Makes migration on write error asynchronous to avoid reentrancy issues (Closed)
Patch Set: Cleaning up. Created 4 years, 3 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
Index: net/quic/chromium/quic_chromium_packet_writer.h
diff --git a/net/quic/chromium/quic_chromium_packet_writer.h b/net/quic/chromium/quic_chromium_packet_writer.h
index 72b25adb9004ae305a5c8a78a616a500f1fa2920..19dca39674887cac5466eb0ab4ee963b50be7853 100644
--- a/net/quic/chromium/quic_chromium_packet_writer.h
+++ b/net/quic/chromium/quic_chromium_packet_writer.h
@@ -32,8 +32,10 @@ class NET_EXPORT_PRIVATE QuicChromiumPacketWriter : public QuicPacketWriter {
// |error_code| otherwise.
virtual int HandleWriteError(int error_code,
scoped_refptr<StringIOBuffer> last_packet) = 0;
+
// Called to propagate the final write error to the delegate.
virtual void OnWriteError(int error_code) = 0;
+
// Called when the writer is unblocked due to a write completion.
virtual void OnWriteUnblocked() = 0;
};
@@ -47,7 +49,7 @@ class NET_EXPORT_PRIVATE QuicChromiumPacketWriter : public QuicPacketWriter {
void set_delegate(Delegate* delegate) { delegate_ = delegate; }
// Writes |packet| to the socket and returns the error code from the write.
- int WritePacketToSocket(StringIOBuffer* packet);
+ WriteResult WritePacketToSocket(scoped_refptr<StringIOBuffer> packet);
// QuicPacketWriter
WriteResult WritePacket(const char* buffer,

Powered by Google App Engine
This is Rietveld 408576698