Bug 888583 - Move SPDY protocol codes to nsHttp.h. r=mcmanus

This commit is contained in:
Robert Bindar 2013-07-08 09:10:18 -04:00
parent c91799e4ad
commit 73fd524632
3 changed files with 12 additions and 8 deletions

View File

@ -27,8 +27,8 @@ ASpdySession::NewSpdySession(uint32_t version,
{
// This is a necko only interface, so we can enforce version
// requests as a precondition
MOZ_ASSERT(version == SpdyInformation::SPDY_VERSION_2 ||
version == SpdyInformation::SPDY_VERSION_3,
MOZ_ASSERT(version == SPDY_VERSION_2 ||
version == SPDY_VERSION_3,
"Unsupported spdy version");
// Don't do a runtime check of IsSpdyV?Enabled() here because pref value
@ -38,7 +38,7 @@ ASpdySession::NewSpdySession(uint32_t version,
Telemetry::Accumulate(Telemetry::SPDY_VERSION2, version);
if (version == SpdyInformation::SPDY_VERSION_2)
if (version == SPDY_VERSION_2)
return new SpdySession2(aTransaction, aTransport, aPriority);
return new SpdySession3(aTransaction, aTransport, aPriority);

View File

@ -67,11 +67,6 @@ public:
// string was known.
nsresult GetNPNVersionIndex(const nsACString &npnString, uint8_t *result);
enum {
SPDY_VERSION_2 = 2,
SPDY_VERSION_3 = 3
};
uint8_t Version[2];
nsCString VersionString[2];
};

View File

@ -21,6 +21,15 @@
#define NS_HTTP_VERSION_1_0 10
#define NS_HTTP_VERSION_1_1 11
namespace mozilla {
namespace net {
enum {
SPDY_VERSION_2 = 2,
SPDY_VERSION_3 = 3
};
} // namespace mozilla::net
} // namespace mozilla
typedef uint8_t nsHttpVersion;
//-----------------------------------------------------------------------------