diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-15 18:21:53 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-15 18:21:53 +0000 |
commit | 7db7417c5dc907e4667a8ab2161c3b3ba2efae43 (patch) | |
tree | 58b673a9396159fee666363a3015121a0cababb7 | |
parent | 502aaaef87e7562dde1feb50e3287f5864508574 (diff) | |
download | chromium_src-7db7417c5dc907e4667a8ab2161c3b3ba2efae43.zip chromium_src-7db7417c5dc907e4667a8ab2161c3b3ba2efae43.tar.gz chromium_src-7db7417c5dc907e4667a8ab2161c3b3ba2efae43.tar.bz2 |
Don't call the zlib functions with the MOZ_Z_ prefix
in the source code.
R=agl,hclam,jar
BUG=none
TEST=No build or test failures
Review URL: http://codereview.chromium.org/6529006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74975 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/base/gzip_filter.cc | 17 | ||||
-rw-r--r-- | net/base/gzip_filter_unittest.cc | 10 | ||||
-rw-r--r-- | remoting/base/compressor_zlib.cc | 7 | ||||
-rw-r--r-- | remoting/base/decompressor_zlib.cc | 7 |
4 files changed, 6 insertions, 35 deletions
diff --git a/net/base/gzip_filter.cc b/net/base/gzip_filter.cc index 7248f2d..daee25f 100644 --- a/net/base/gzip_filter.cc +++ b/net/base/gzip_filter.cc @@ -6,15 +6,6 @@ #if defined(USE_SYSTEM_ZLIB) #include <zlib.h> -// The code below uses the MOZ_Z_ forms of these functions in order that things -// should work on Windows. In order to make this code cross platform, we map -// back to the normal functions here in the case that we are using the system -// zlib. -#define MOZ_Z_inflate inflate -#define MOZ_Z_inflateEnd inflateEnd -#define MOZ_Z_inflateInit2_ inflateInit2_ -#define MOZ_Z_inflateInit_ inflateInit_ -#define MOZ_Z_inflateReset inflateReset #else #include "third_party/zlib/zlib.h" #endif @@ -36,7 +27,7 @@ GZipFilter::GZipFilter(const FilterContext& filter_context) GZipFilter::~GZipFilter() { if (decoding_status_ != DECODING_UNINITIALIZED) { - MOZ_Z_inflateEnd(zlib_stream_.get()); + inflateEnd(zlib_stream_.get()); } } @@ -224,7 +215,7 @@ Filter::FilterStatus GZipFilter::DoInflate(char* dest_buffer, int* dest_len) { zlib_stream_.get()->next_out = bit_cast<Bytef*>(dest_buffer); zlib_stream_.get()->avail_out = *dest_len; - int inflate_code = MOZ_Z_inflate(zlib_stream_.get(), Z_NO_FLUSH); + int inflate_code = inflate(zlib_stream_.get(), Z_NO_FLUSH); int bytesWritten = *dest_len - zlib_stream_.get()->avail_out; Filter::FilterStatus status; @@ -284,13 +275,13 @@ bool GZipFilter::InsertZlibHeader() { if (zlib_header_added_) return false; - MOZ_Z_inflateReset(zlib_stream_.get()); + inflateReset(zlib_stream_.get()); zlib_stream_.get()->next_in = bit_cast<Bytef*>(&dummy_head[0]); zlib_stream_.get()->avail_in = sizeof(dummy_head); zlib_stream_.get()->next_out = bit_cast<Bytef*>(&dummy_output[0]); zlib_stream_.get()->avail_out = sizeof(dummy_output); - int code = MOZ_Z_inflate(zlib_stream_.get(), Z_NO_FLUSH); + int code = inflate(zlib_stream_.get(), Z_NO_FLUSH); zlib_header_added_ = true; return (code == Z_OK); diff --git a/net/base/gzip_filter_unittest.cc b/net/base/gzip_filter_unittest.cc index 758418c..247e7da 100644 --- a/net/base/gzip_filter_unittest.cc +++ b/net/base/gzip_filter_unittest.cc @@ -6,12 +6,6 @@ #include <iostream> #if defined(USE_SYSTEM_ZLIB) -// The code below uses the MOZ_Z_ forms of these functions in order that things -// should work on Windows. In order to make this code cross platform, we map -// back to the normal functions here in the case that we are using the system -// zlib. -#define MOZ_Z_deflate deflate -#define MOZ_Z_deflateEnd deflateEnd #include <zlib.h> #else #include "third_party/zlib/zlib.h" @@ -152,10 +146,10 @@ class GZipUnitTest : public PlatformTest { } // Do deflate - code = MOZ_Z_deflate(&zlib_stream, Z_FINISH); + code = deflate(&zlib_stream, Z_FINISH); *dest_len = *dest_len - zlib_stream.avail_out; - MOZ_Z_deflateEnd(&zlib_stream); + deflateEnd(&zlib_stream); return code; } diff --git a/remoting/base/compressor_zlib.cc b/remoting/base/compressor_zlib.cc index 0128361..05ad621 100644 --- a/remoting/base/compressor_zlib.cc +++ b/remoting/base/compressor_zlib.cc @@ -6,13 +6,6 @@ #if defined(USE_SYSTEM_ZLIB) #include <zlib.h> -// The code below uses the MOZ_Z_ forms of these functions in order that things -// should work on Windows. In order to make this code cross platform, we map -// back to the normal functions here in the case that we are using the system -// zlib. -#define MOZ_Z_deflate deflate -#define MOZ_Z_deflateEnd deflateEnd -#define MOZ_Z_deflateInit_ deflateInit_ #else #include "third_party/zlib/zlib.h" #endif diff --git a/remoting/base/decompressor_zlib.cc b/remoting/base/decompressor_zlib.cc index 4eb5168..770abd5 100644 --- a/remoting/base/decompressor_zlib.cc +++ b/remoting/base/decompressor_zlib.cc @@ -6,13 +6,6 @@ #if defined(USE_SYSTEM_ZLIB) #include <zlib.h> -// The code below uses the MOZ_Z_ forms of these functions in order that things -// should work on Windows. In order to make this code cross platform, we map -// back to the normal functions here in the case that we are using the system -// zlib. -#define MOZ_Z_inflate inflate -#define MOZ_Z_inflateEnd inflateEnd -#define MOZ_Z_inflateInit_ inflateInit_ #else #include "third_party/zlib/zlib.h" #endif |