Minor cleanup. Adds test size annotations and moves the declaration of Http2Adapter::RstStream within the header file.
PiperOrigin-RevId: 375152110
diff --git a/http2/adapter/http2_adapter.h b/http2/adapter/http2_adapter.h
index ef2ae0a..c97fd27 100644
--- a/http2/adapter/http2_adapter.h
+++ b/http2/adapter/http2_adapter.h
@@ -56,6 +56,10 @@
virtual void SubmitWindowUpdate(Http2StreamId stream_id,
int window_increment) = 0;
+ // Submits a RST_STREAM for the given |stream_id| and |error_code|.
+ virtual void SubmitRst(Http2StreamId stream_id,
+ Http2ErrorCode error_code) = 0;
+
// Submits a METADATA frame for the given stream (a |stream_id| of 0 indicates
// connection-level METADATA). If |fin|, the frame will also have the
// END_METADATA flag set.
@@ -74,10 +78,6 @@
virtual void MarkDataConsumedForStream(Http2StreamId stream_id,
size_t num_bytes) = 0;
- // Submits a RST_STREAM for the given stream.
- virtual void SubmitRst(Http2StreamId stream_id,
- Http2ErrorCode error_code) = 0;
-
protected:
// Subclasses should expose a public factory method for constructing and
// initializing (via Initialize()) adapter instances.
diff --git a/http2/adapter/nghttp2_adapter.h b/http2/adapter/nghttp2_adapter.h
index 13c2ffc..55f8d3d 100644
--- a/http2/adapter/nghttp2_adapter.h
+++ b/http2/adapter/nghttp2_adapter.h
@@ -54,6 +54,9 @@
void SubmitWindowUpdate(Http2StreamId stream_id,
int window_increment) override;
+ // Submits a RST_STREAM for the given |stream_id| and |error_code|.
+ void SubmitRst(Http2StreamId stream_id, Http2ErrorCode error_code) override;
+
// Submits a METADATA frame for the given stream (a |stream_id| of 0 indicates
// connection-level METADATA). If |end_metadata|, the frame will also have the
// END_METADATA flag set.
@@ -72,9 +75,6 @@
void MarkDataConsumedForStream(Http2StreamId stream_id,
size_t num_bytes) override;
- // Submits a RST_STREAM with the desired |error_code|.
- void SubmitRst(Http2StreamId stream_id, Http2ErrorCode error_code) override;
-
// TODO(b/181586191): Temporary accessor until equivalent functionality is
// available in this adapter class.
NgHttp2Session& session() { return *session_; }