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

Unified Diff: net/tools/quic/quic_client_base.h

Issue 2363393004: Remove usage of BalsaHeaders from QuicClient. Also move QuicDataToResend from QuicClient to QuicCli… (Closed)
Patch Set: Fix win 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
« no previous file with comments | « net/tools/quic/quic_client.cc ('k') | net/tools/quic/quic_client_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_client_base.h
diff --git a/net/tools/quic/quic_client_base.h b/net/tools/quic/quic_client_base.h
index db066663f9ea897e5f08ded758af7b9838a60eff..f15f25fe6ae9b75eb3814ab81365e65f59f72b43 100644
--- a/net/tools/quic/quic_client_base.h
+++ b/net/tools/quic/quic_client_base.h
@@ -33,6 +33,35 @@ class QuicServerId;
class QuicClientBase {
public:
+ // The client uses these objects to keep track of any data to resend upon
+ // receipt of a stateless reject. Recall that the client API allows callers
+ // to optimistically send data to the server prior to handshake-confirmation.
+ // If the client subsequently receives a stateless reject, it must tear down
+ // its existing session, create a new session, and resend all previously sent
+ // data. It uses these objects to keep track of all the sent data, and to
+ // resend the data upon a subsequent connection.
+ class QuicDataToResend {
+ public:
+ // |headers| may be null, since it's possible to send data without headers.
+ QuicDataToResend(std::unique_ptr<SpdyHeaderBlock> headers,
+ base::StringPiece body,
+ bool fin);
+
+ virtual ~QuicDataToResend();
+
+ // Must be overridden by specific classes with the actual method for
+ // re-sending data.
+ virtual void Resend() = 0;
+
+ protected:
+ std::unique_ptr<SpdyHeaderBlock> headers_;
+ base::StringPiece body_;
+ bool fin_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(QuicDataToResend);
+ };
+
QuicClientBase(const QuicServerId& server_id,
const QuicVersionVector& supported_versions,
const QuicConfig& config,
« no previous file with comments | « net/tools/quic/quic_client.cc ('k') | net/tools/quic/quic_client_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698