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

Unified Diff: net/spdy/spdy_session.h

Issue 2675593002: Spdy{RstStream,GoAway}Status -> SpdyErrorCode. (Closed)
Patch Set: Merged master, which includes 145087791. Created 3 years, 11 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/spdy/spdy_proxy_client_socket_unittest.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.h
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index fb61ec755e4f7de79b76ae226a1430ae989b6127..30150e2310cc3debca09b8c789dda2cc8cc9e668 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -108,7 +108,7 @@ enum SpdyProtocolErrorDetails {
SPDY_ERROR_INTERNAL_FRAMER_ERROR = 41,
SPDY_ERROR_INVALID_CONTROL_FRAME_SIZE = 37,
SPDY_ERROR_OVERSIZED_PAYLOAD = 40,
- // SpdyRstStreamStatus mappings.
+ // SpdyErrorCode mappings.
STATUS_CODE_NO_ERROR = 41,
STATUS_CODE_PROTOCOL_ERROR = 11,
STATUS_CODE_INTERNAL_ERROR = 16,
@@ -145,15 +145,15 @@ MapFramerErrorToProtocolError(SpdyFramer::SpdyFramerError error);
Error NET_EXPORT_PRIVATE
MapFramerErrorToNetError(SpdyFramer::SpdyFramerError error);
SpdyProtocolErrorDetails NET_EXPORT_PRIVATE
- MapRstStreamStatusToProtocolError(SpdyRstStreamStatus status);
-SpdyGoAwayStatus NET_EXPORT_PRIVATE MapNetErrorToGoAwayStatus(Error err);
+MapRstStreamStatusToProtocolError(SpdyErrorCode error_code);
+SpdyErrorCode NET_EXPORT_PRIVATE MapNetErrorToGoAwayStatus(Error err);
// If these compile asserts fail then SpdyProtocolErrorDetails needs
// to be updated with new values, as do the mapping functions above.
static_assert(17 == SpdyFramer::LAST_ERROR,
"SpdyProtocolErrorDetails / Spdy Errors mismatch");
-static_assert(14 == RST_STREAM_NUM_STATUS_CODES,
- "SpdyProtocolErrorDetails / RstStreamStatus mismatch");
+static_assert(13 == SpdyErrorCode::ERROR_CODE_MAX,
+ "SpdyProtocolErrorDetails / SpdyErrorCode mismatch");
// A helper class used to manage a request to create a stream.
class NET_EXPORT_PRIVATE SpdyStreamRequest {
@@ -396,7 +396,7 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
// stream with the given ID, which must exist and be active. Note
// that that stream may hold the last reference to the session.
void ResetStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status,
+ SpdyErrorCode error_code,
const std::string& description);
// Check if a stream is active.
@@ -690,7 +690,7 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
// Calls EnqueueResetStreamFrame() and then
// CloseActiveStreamIterator().
void ResetStreamIterator(ActiveStreamMap::iterator it,
- SpdyRstStreamStatus status,
+ SpdyErrorCode error_code,
const std::string& description);
// Send a RST_STREAM frame with the given parameters. There should
@@ -698,7 +698,7 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
// stream should be closed shortly after this function is called.
void EnqueueResetStreamFrame(SpdyStreamId stream_id,
RequestPriority priority,
- SpdyRstStreamStatus status,
+ SpdyErrorCode error_code,
const std::string& description);
// Send a PRIORITY frame with the given parameters.
@@ -861,9 +861,9 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
void OnStreamError(SpdyStreamId stream_id,
const std::string& description) override;
void OnPing(SpdyPingId unique_id, bool is_ack) override;
- void OnRstStream(SpdyStreamId stream_id, SpdyRstStreamStatus status) override;
+ void OnRstStream(SpdyStreamId stream_id, SpdyErrorCode error_code) override;
void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status,
+ SpdyErrorCode error_code,
base::StringPiece debug_data) override;
void OnDataFrameHeader(SpdyStreamId stream_id,
size_t length,
« no previous file with comments | « net/spdy/spdy_proxy_client_socket_unittest.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698