diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 23:02:11 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 23:02:11 +0000 |
commit | 4b3c95dd199586b4c540800be8cd223e948e5e3f (patch) | |
tree | c97ef865a3c85f09e920d8b1bc4024a56bb8e8cf /net/base/gzip_header.h | |
parent | d160ec0e875e98829684f040d843e6a292dbb3ba (diff) | |
download | chromium_src-4b3c95dd199586b4c540800be8cd223e948e5e3f.zip chromium_src-4b3c95dd199586b4c540800be8cd223e948e5e3f.tar.gz chromium_src-4b3c95dd199586b4c540800be8cd223e948e5e3f.tar.bz2 |
Start reordering the methods in headers in net/.
This patch also starts reordering some of the cc files to match their
headers. More of both cleanups will be done in future patches.
BUG=68682
TEST=compiles
Review URL: http://codereview.chromium.org/6085013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70799 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/gzip_header.h')
-rw-r--r-- | net/base/gzip_header.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/base/gzip_header.h b/net/base/gzip_header.h index 81f6f19..c245de2 100644 --- a/net/base/gzip_header.h +++ b/net/base/gzip_header.h @@ -20,9 +20,16 @@ class GZipHeader { public: + enum Status { + INCOMPLETE_HEADER, // don't have all the bits yet... + COMPLETE_HEADER, // complete, valid header + INVALID_HEADER, // found something invalid in the header + }; + GZipHeader() { Reset(); } + ~GZipHeader() { } @@ -33,12 +40,6 @@ class GZipHeader { extra_length_ = 0; } - enum Status { - INCOMPLETE_HEADER, // don't have all the bits yet... - COMPLETE_HEADER, // complete, valid header - INVALID_HEADER, // found something invalid in the header - }; - // Attempt to parse the given buffer as the next installment of // bytes from a gzip header. If the bytes we've seen so far do not // yet constitute a complete gzip header, return @@ -49,9 +50,6 @@ class GZipHeader { Status ReadMore(const char* inbuf, int inbuf_len, const char** header_end); private: - - static const uint8 magic[]; // gzip magic header - enum { // flags (see RFC) FLAG_FTEXT = 0x01, // bit 0 set: file probably ascii text FLAG_FHCRC = 0x02, // bit 1 set: header CRC present @@ -88,6 +86,8 @@ class GZipHeader { IN_DONE, }; + static const uint8 magic[]; // gzip magic header + int state_; // our current State in the parsing FSM: an int so we can ++ uint8 flags_; // the flags byte of the header ("FLG" in the RFC) uint16 extra_length_; // how much of the "extra field" we have yet to read |