Index: net/spdy/spdy_session.h |
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h |
index 7b93171b45fb37b1e91748f664377a093494f240..1b86fbc53b0f94fcc390286bbe9e1e77f6101f8a 100644 |
--- a/net/spdy/spdy_session.h |
+++ b/net/spdy/spdy_session.h |
@@ -49,6 +49,32 @@ class BoundNetLog; |
class SpdyStream; |
class SSLInfo; |
+enum SpdySessionErrorDetails { |
+ // SpdyFramer::SpdyErrors |
+ SPDY_NO_ERROR, |
+ SPDY_INVALID_CONTROL_FRAME, // Control frame is mal-formatted. |
+ SPDY_CONTROL_PAYLOAD_TOO_LARGE, // Control frame payload was too large. |
+ SPDY_ZLIB_INIT_FAILURE, // The Zlib library could not initialize. |
+ SPDY_UNSUPPORTED_VERSION, // Control frame has unsupported version. |
+ SPDY_DECOMPRESS_FAILURE, // There was an error decompressing. |
+ SPDY_COMPRESS_FAILURE, // There was an error compressing. |
+ SPDY_CREDENTIAL_FRAME_CORRUPT, // CREDENTIAL frame could not be parsed. |
+ SPDY_INVALID_DATA_FRAME_FLAGS, // Data frame has invalid flags. |
+ |
+ // SpdySession errors |
+ UNEXPECTED_PING, |
+ PING_FAILED, |
+ SPDY_COMPRESSION_FAILURE, |
+ REQUST_FOR_SECURE_CONTENT_OVER_INSECURE_SESSION, |
willchan no longer on Chromium
2012/04/27 21:59:30
REQUEST
|
+ READ_FAILED, |
+ WRITE_FAILED, |
+ NUM_SPDY_SESSION_ERROR_DETAILS |
+}; |
+ |
+COMPILE_ASSERT(static_cast<SpdySessionErrorDetails>(SpdyFramer::LAST_ERROR) == |
willchan no longer on Chromium
2012/04/27 21:59:30
include compiler_specific.h for this
|
+ UNEXPECTED_PING, |
+ SpdySessionErrorDetails_SpdyErrors_mismatch); |
+ |
class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>, |
public BufferedSpdyFramerVisitorInterface { |
public: |
@@ -206,6 +232,7 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>, |
// session pool. |
// |description| indicates the reason for the error. |
void CloseSessionOnError(net::Error err, |
+ SpdySessionErrorDetails details, |
bool remove_from_pool, |
const std::string& description); |
@@ -429,7 +456,7 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>, |
void InvokeUserStreamCreationCallback(scoped_refptr<SpdyStream>* stream); |
// BufferedSpdyFramerVisitorInterface: |
- virtual void OnError(int error_code) OVERRIDE; |
+ virtual void OnError(SpdyFramer::SpdyError error_code) OVERRIDE; |
virtual void OnStreamError(SpdyStreamId stream_id, |
const std::string& description) OVERRIDE; |
virtual void OnRstStream( |