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

Unified Diff: net/spdy/spdy_framer.h

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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_reader_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 8e2ce1c05752649a355e1dc04fed0f4cafe92752..35bfafb77a6c6727d759bfb5afc09ea60accd5d0 100644
--- a/net/spdy/spdy_framer.h
+++ b/net/spdy/spdy_framer.h
@@ -5,6 +5,9 @@
#ifndef NET_SPDY_SPDY_FRAMER_H_
#define NET_SPDY_SPDY_FRAMER_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <map>
#include <memory>
#include <string>
@@ -48,27 +51,27 @@ class SpdyFramerPeer;
class NET_EXPORT_PRIVATE SettingsFlagsAndId {
public:
static SettingsFlagsAndId FromWireFormat(SpdyMajorVersion version,
- uint32 wire);
+ uint32_t wire);
SettingsFlagsAndId() : flags_(0), id_(0) {}
// TODO(hkhalil): restrict to enums instead of free-form ints.
- SettingsFlagsAndId(uint8 flags, uint32 id);
+ SettingsFlagsAndId(uint8_t flags, uint32_t id);
- uint32 GetWireFormat(SpdyMajorVersion version) const;
+ uint32_t GetWireFormat(SpdyMajorVersion version) const;
- uint32 id() const { return id_; }
- uint8 flags() const { return flags_; }
+ uint32_t id() const { return id_; }
+ uint8_t flags() const { return flags_; }
private:
- static void ConvertFlagsAndIdForSpdy2(uint32* val);
+ static void ConvertFlagsAndIdForSpdy2(uint32_t* val);
- uint8 flags_;
- uint32 id_;
+ uint8_t flags_;
+ uint32_t id_;
};
// SettingsMap has unique (flags, value) pair for given SpdySettingsIds ID.
-typedef std::pair<SpdySettingsFlags, uint32> SettingsFlagsAndValue;
+typedef std::pair<SpdySettingsFlags, uint32_t> SettingsFlagsAndValue;
typedef std::map<SpdySettingsIds, SettingsFlagsAndValue> SettingsMap;
// SpdyFramerVisitorInterface is a set of callbacks for the SpdyFramer.
@@ -174,7 +177,7 @@ class NET_EXPORT_PRIVATE SpdyFramerVisitorInterface {
// Called when a complete setting within a SETTINGS frame has been parsed and
// validated.
- virtual void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) = 0;
+ virtual void OnSetting(SpdySettingsIds id, uint8_t flags, uint32_t value) = 0;
// Called when a SETTINGS frame is received with the ACK flag set.
virtual void OnSettingsAck() {}
@@ -260,7 +263,7 @@ class NET_EXPORT_PRIVATE SpdyFramerVisitorInterface {
// Called when a PRIORITY frame is received.
virtual void OnPriority(SpdyStreamId stream_id,
SpdyStreamId parent_stream_id,
- uint8 weight,
+ uint8_t weight,
bool exclusive) {}
// Called when a frame type we don't recognize is received.
@@ -553,8 +556,8 @@ class NET_EXPORT_PRIVATE SpdyFramer {
// Interpolates SpdyPriority values into SPDY4/HTTP2 priority weights,
// and vice versa.
- static uint8 MapPriorityToWeight(SpdyPriority priority);
- static SpdyPriority MapWeightToPriority(uint8 weight);
+ static uint8_t MapPriorityToWeight(SpdyPriority priority);
+ static SpdyPriority MapWeightToPriority(uint8_t weight);
// Deliver the given control frame's compressed headers block to the visitor
// in decompressed form, in chunks. Returns true if the visitor has
@@ -565,7 +568,7 @@ class NET_EXPORT_PRIVATE SpdyFramer {
size_t len);
// Updates the maximum size of the header encoder compression table.
- void UpdateHeaderEncoderTableSize(uint32 value);
+ void UpdateHeaderEncoderTableSize(uint32_t value);
// Returns the maximum size of the header encoder compression table.
size_t header_encoder_table_size() const;
@@ -732,7 +735,7 @@ class NET_EXPORT_PRIVATE SpdyFramer {
SpdyFrameType current_frame_type_;
// The total length of the frame currently being read, including frame header.
- uint32 current_frame_length_;
+ uint32_t current_frame_length_;
// The stream ID field of the frame currently being read, if applicable.
SpdyStreamId current_frame_stream_id_;
@@ -766,7 +769,7 @@ class NET_EXPORT_PRIVATE SpdyFramer {
const SpdyMajorVersion protocol_version_;
// The flags field of the frame currently being read.
- uint8 current_frame_flags_;
+ uint8_t current_frame_flags_;
// Determines whether HPACK or gzip compression is used.
bool enable_compression_;
« no previous file with comments | « net/spdy/spdy_frame_reader_test.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698