diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-30 18:49:42 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-30 18:49:42 +0000 |
commit | 90946cf282c6a6c6b9a5dae471201fb8869cb8e2 (patch) | |
tree | 2a2aac5d6d22e64db54d3cbb731028132d29d8a0 /net/base/gzip_header.cc | |
parent | 384853b1969a9dcb0ada5131b9f703f9ed30c1c2 (diff) | |
download | chromium_src-90946cf282c6a6c6b9a5dae471201fb8869cb8e2.zip chromium_src-90946cf282c6a6c6b9a5dae471201fb8869cb8e2.tar.gz chromium_src-90946cf282c6a6c6b9a5dae471201fb8869cb8e2.tar.bz2 |
net: Add namespace net to GZip* classes.
BUG=64263
TEST=compiled locally and trybots
Review URL: http://codereview.chromium.org/6260029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73112 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/gzip_header.cc')
-rw-r--r-- | net/base/gzip_header.cc | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/net/base/gzip_header.cc b/net/base/gzip_header.cc index 5b10a71..23a3dd3 100644 --- a/net/base/gzip_header.cc +++ b/net/base/gzip_header.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -12,17 +12,22 @@ #include "base/logging.h" +namespace net { + const uint8 GZipHeader::magic[] = { 0x1f, 0x8b }; -// ---------------------------------------------------------------------- -// GZipHeader::ReadMore() -// Attempt to parse the beginning of the given buffer as a gzip -// header. If these bytes do not constitute a complete gzip header, -// return INCOMPLETE_HEADER. If these bytes do not constitute a -// *valid* gzip header, return INVALID_HEADER. If we find a -// complete header, return COMPLETE_HEADER and set the pointer -// pointed to by header_end to the first byte beyond the gzip header. -// ---------------------------------------------------------------------- +GZipHeader::GZipHeader() { + Reset(); +} + +GZipHeader::~GZipHeader() { +} + +void GZipHeader::Reset() { + state_ = IN_HEADER_ID1; + flags_ = 0; + extra_length_ = 0; +} GZipHeader::Status GZipHeader::ReadMore(const char* inbuf, int inbuf_len, const char** header_end) { @@ -175,3 +180,5 @@ GZipHeader::Status GZipHeader::ReadMore(const char* inbuf, int inbuf_len, return INCOMPLETE_HEADER; } } + +} // namespace net |