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

Unified Diff: net/spdy/spdy_framer.h

Issue 247243003: SPDY: Use SpdyMajorVersion rather than ints for SPDY version number. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Also include cr/64899106 Created 6 years, 8 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_frame_builder_test.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_framer.h
diff --git a/net/spdy/spdy_framer.h b/net/spdy/spdy_framer.h
index a55cf6af0a3f37d91d5704fe8f11400577e5dca3..97e6278da8de188b07826302da3dc02dfcb4882a 100644
--- a/net/spdy/spdy_framer.h
+++ b/net/spdy/spdy_framer.h
@@ -56,14 +56,15 @@ typedef std::map<std::string, std::string> SpdyHeaderBlock;
// Conveniently handles converstion to/from wire format.
class NET_EXPORT_PRIVATE SettingsFlagsAndId {
public:
- static SettingsFlagsAndId FromWireFormat(int version, uint32 wire);
+ static SettingsFlagsAndId FromWireFormat(net::SpdyMajorVersion version,
+ uint32 wire);
SettingsFlagsAndId() : flags_(0), id_(0) {}
// TODO(hkhalil): restrict to enums instead of free-form ints.
SettingsFlagsAndId(uint8 flags, uint32 id);
- uint32 GetWireFormat(int version) const;
+ uint32 GetWireFormat(net::SpdyMajorVersion version) const;
uint32 id() const { return id_; }
uint8 flags() const { return flags_; }
@@ -320,13 +321,14 @@ class NET_EXPORT_PRIVATE SpdyFramer {
// Serializes a SpdyHeaderBlock.
static void WriteHeaderBlock(SpdyFrameBuilder* frame,
- const int spdy_version,
+ const net::SpdyMajorVersion spdy_version,
const SpdyHeaderBlock* headers);
// Retrieve serialized length of SpdyHeaderBlock.
// TODO(hkhalil): Remove, or move to quic code.
- static size_t GetSerializedLength(const int spdy_version,
- const SpdyHeaderBlock* headers);
+ static size_t GetSerializedLength(
+ const net::SpdyMajorVersion spdy_version,
+ const SpdyHeaderBlock* headers);
// Create a new Framer, provided a SPDY version.
explicit SpdyFramer(SpdyMajorVersion version);
@@ -502,7 +504,10 @@ class NET_EXPORT_PRIVATE SpdyFramer {
SpdyStreamId expect_continuation() const { return expect_continuation_; }
- SpdyPriority GetLowestPriority() const { return spdy_version_ < 3 ? 3 : 7; }
+ SpdyPriority GetLowestPriority() const {
+ return spdy_version_ < SPDY3 ? 3 : 7;
+ }
+
SpdyPriority GetHighestPriority() const { return 0; }
// Deliver the given control frame's compressed headers block to the visitor
« no previous file with comments | « net/spdy/spdy_frame_builder_test.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698