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

Unified Diff: net/filter/gzip_header.h

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: net/filter/gzip_header.h
diff --git a/net/filter/gzip_header.h b/net/filter/gzip_header.h
index 986afc44a7bb75ad161122d680dc288d601cd145..93126aae51e3814c2392a22b02bcf2073d4b865b 100644
--- a/net/filter/gzip_header.h
+++ b/net/filter/gzip_header.h
@@ -22,9 +22,9 @@ namespace net {
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
+ INCOMPLETE_HEADER, // don't have all the bits yet...
+ COMPLETE_HEADER, // complete, valid header
+ INVALID_HEADER, // found something invalid in the header
};
GZipHeader();
@@ -40,17 +40,16 @@ class GZipHeader {
// gzip header, return INVALID_HEADER. When we've seen a complete
// gzip header, return COMPLETE_HEADER and set the pointer pointed
// to by header_end to the first byte beyond the gzip header.
- Status ReadMore(const char* inbuf,
- int inbuf_len,
- const char** header_end);
+ Status ReadMore(const char* inbuf, int inbuf_len, const char** header_end);
+
private:
- enum { // flags (see RFC)
- FLAG_FTEXT = 0x01, // bit 0 set: file probably ascii text
- FLAG_FHCRC = 0x02, // bit 1 set: header CRC present
- FLAG_FEXTRA = 0x04, // bit 2 set: extra field present
- FLAG_FNAME = 0x08, // bit 3 set: original file name present
- FLAG_FCOMMENT = 0x10, // bit 4 set: file comment present
- FLAG_RESERVED = 0xE0, // bits 5..7: reserved
+ enum { // flags (see RFC)
+ FLAG_FTEXT = 0x01, // bit 0 set: file probably ascii text
+ FLAG_FHCRC = 0x02, // bit 1 set: header CRC present
+ FLAG_FEXTRA = 0x04, // bit 2 set: extra field present
+ FLAG_FNAME = 0x08, // bit 3 set: original file name present
+ FLAG_FCOMMENT = 0x10, // bit 4 set: file comment present
+ FLAG_RESERVED = 0xE0, // bits 5..7: reserved
};
enum State {
@@ -65,25 +64,20 @@ class GZipHeader {
IN_HEADER_MTIME_BYTE_3,
IN_HEADER_XFL,
IN_HEADER_OS,
-
IN_XLEN_BYTE_0,
IN_XLEN_BYTE_1,
IN_FEXTRA,
-
IN_FNAME,
-
IN_FCOMMENT,
-
IN_FHCRC_BYTE_0,
IN_FHCRC_BYTE_1,
-
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)
+ 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
DISALLOW_COPY_AND_ASSIGN(GZipHeader);

Powered by Google App Engine
This is Rietveld 408576698