diff options
author | asharif@chromium.org <asharif@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-26 13:58:47 +0000 |
---|---|---|
committer | asharif@chromium.org <asharif@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-26 13:58:47 +0000 |
commit | 4c2ec0f3ee197f32af8d5f6835f44e57c384588c (patch) | |
tree | 8233dd6c75a25f4a9c78eb881d4eeed532661dae /chrome/browser/metrics | |
parent | d9e667d22e534362fd3c3e64d4912e6e41c7467e (diff) | |
download | chromium_src-4c2ec0f3ee197f32af8d5f6835f44e57c384588c.zip chromium_src-4c2ec0f3ee197f32af8d5f6835f44e57c384588c.tar.gz chromium_src-4c2ec0f3ee197f32af8d5f6835f44e57c384588c.tar.bz2 |
uma: replace a zutil.h define with a constant.
zutil.h is a private include that should not be included by
applications. It can cause problems when using the system zlib.
BUG=none
TEST=git cl try.
Review URL: https://chromiumcodereview.appspot.com/20160002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213898 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metrics')
-rw-r--r-- | chrome/browser/metrics/compression_utils.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/metrics/compression_utils.cc b/chrome/browser/metrics/compression_utils.cc index d2c2611..71f68ab 100644 --- a/chrome/browser/metrics/compression_utils.cc +++ b/chrome/browser/metrics/compression_utils.cc @@ -8,7 +8,6 @@ #include "base/basictypes.h" #include "third_party/zlib/zlib.h" -#include "third_party/zlib/zutil.h" namespace { @@ -19,6 +18,11 @@ const size_t kGzipZlibHeaderDifferenceBytes = 16; // zlib header when calling deflateInit2_. const int kWindowBitsToGetGzipHeader = 16; +// This describes the amount of memory zlib uses to compress data. It can go +// from 1 to 9, with 8 being the default. For details, see: +// http://www.zlib.net/manual.html (search for memLevel). +const int kZlibMemoryLevel = 8; + // This code is taken almost verbatim from third_party/zlib/compress.c. The only // difference is deflateInit2_ is called which sets the window bits to be > 16. // That causes a gzip header to be emitted rather than a zlib header. @@ -45,7 +49,7 @@ int GzipCompressHelper(Bytef* dest, Z_DEFAULT_COMPRESSION, Z_DEFLATED, MAX_WBITS + kWindowBitsToGetGzipHeader, - DEF_MEM_LEVEL, + kZlibMemoryLevel, Z_DEFAULT_STRATEGY, ZLIB_VERSION, sizeof(z_stream)); |