| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/base/decompressor_zlib.h" | 5 #include "remoting/base/decompressor_zlib.h" |
| 6 | 6 |
| 7 #if defined(USE_SYSTEM_ZLIB) | 7 #if defined(USE_SYSTEM_ZLIB) |
| 8 #include <zlib.h> | 8 #include <zlib.h> |
| 9 // The code below uses the MOZ_Z_ forms of these functions in order that things | |
| 10 // should work on Windows. In order to make this code cross platform, we map | |
| 11 // back to the normal functions here in the case that we are using the system | |
| 12 // zlib. | |
| 13 #define MOZ_Z_inflate inflate | |
| 14 #define MOZ_Z_inflateEnd inflateEnd | |
| 15 #define MOZ_Z_inflateInit_ inflateInit_ | |
| 16 #else | 9 #else |
| 17 #include "third_party/zlib/zlib.h" | 10 #include "third_party/zlib/zlib.h" |
| 18 #endif | 11 #endif |
| 19 #include "base/logging.h" | 12 #include "base/logging.h" |
| 20 | 13 |
| 21 namespace remoting { | 14 namespace remoting { |
| 22 | 15 |
| 23 DecompressorZlib::DecompressorZlib() { | 16 DecompressorZlib::DecompressorZlib() { |
| 24 InitStream(); | 17 InitStream(); |
| 25 } | 18 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 56 |
| 64 stream_->next_in = Z_NULL; | 57 stream_->next_in = Z_NULL; |
| 65 stream_->zalloc = Z_NULL; | 58 stream_->zalloc = Z_NULL; |
| 66 stream_->zfree = Z_NULL; | 59 stream_->zfree = Z_NULL; |
| 67 stream_->opaque = Z_NULL; | 60 stream_->opaque = Z_NULL; |
| 68 | 61 |
| 69 inflateInit(stream_.get()); | 62 inflateInit(stream_.get()); |
| 70 } | 63 } |
| 71 | 64 |
| 72 } // namespace remoting | 65 } // namespace remoting |
| OLD | NEW |