| Index: net/filter/gzip_filter.cc
|
| diff --git a/net/filter/gzip_filter.cc b/net/filter/gzip_filter.cc
|
| index 36fe01cb1cecd81808b604819a8d80fe5049a4d4..b69c7bee8315a8d67a1cc54c8804504a66a630ba 100644
|
| --- a/net/filter/gzip_filter.cc
|
| +++ b/net/filter/gzip_filter.cc
|
| @@ -44,8 +44,8 @@ bool GZipFilter::InitDecoding(Filter::FilterType filter_type) {
|
| break;
|
| }
|
| case Filter::FILTER_TYPE_GZIP_HELPING_SDCH:
|
| - possible_sdch_pass_through_ = true; // Needed to optionally help sdch.
|
| - // Fall through to GZIP case.
|
| + possible_sdch_pass_through_ = true; // Needed to optionally help sdch.
|
| + // Fall through to GZIP case.
|
| case Filter::FILTER_TYPE_GZIP: {
|
| gzip_header_.reset(new GZipHeader());
|
| if (!gzip_header_.get())
|
| @@ -55,9 +55,7 @@ bool GZipFilter::InitDecoding(Filter::FilterType filter_type) {
|
| decoding_mode_ = DECODE_MODE_GZIP;
|
| break;
|
| }
|
| - default: {
|
| - return false;
|
| - }
|
| + default: { return false; }
|
| }
|
|
|
| decoding_status_ = DECODING_IN_PROGRESS;
|
| @@ -116,7 +114,7 @@ Filter::FilterStatus GZipFilter::ReadFilteredData(char* dest_buffer,
|
| return status;
|
| }
|
| default: {
|
| - status = Filter::FILTER_ERROR; // Unexpected.
|
| + status = Filter::FILTER_ERROR; // Unexpected.
|
| decoding_status_ = DECODING_ERROR;
|
| return status;
|
| }
|
| @@ -155,8 +153,8 @@ Filter::FilterStatus GZipFilter::CheckGZipHeader() {
|
|
|
| const char* header_end = NULL;
|
| GZipHeader::Status header_status;
|
| - header_status = gzip_header_->ReadMore(next_stream_data_, stream_data_len_,
|
| - &header_end);
|
| + header_status =
|
| + gzip_header_->ReadMore(next_stream_data_, stream_data_len_, &header_end);
|
|
|
| switch (header_status) {
|
| case GZipHeader::INCOMPLETE_HEADER: {
|
| @@ -167,8 +165,8 @@ Filter::FilterStatus GZipFilter::CheckGZipHeader() {
|
| }
|
| case GZipHeader::COMPLETE_HEADER: {
|
| // We have a complete header. Check whether there are more data.
|
| - int num_chars_left = static_cast<int>(stream_data_len_ -
|
| - (header_end - next_stream_data_));
|
| + int num_chars_left =
|
| + static_cast<int>(stream_data_len_ - (header_end - next_stream_data_));
|
| gzip_header_status_ = GZIP_GET_COMPLETE_HEADER;
|
|
|
| if (num_chars_left > 0) {
|
| @@ -185,9 +183,7 @@ Filter::FilterStatus GZipFilter::CheckGZipHeader() {
|
| gzip_header_status_ = GZIP_GET_INVALID_HEADER;
|
| return Filter::FILTER_ERROR;
|
| }
|
| - default: {
|
| - break;
|
| - }
|
| + default: { break; }
|
| }
|
|
|
| return Filter::FILTER_ERROR;
|
| @@ -261,7 +257,7 @@ Filter::FilterStatus GZipFilter::DoInflate(char* dest_buffer, int* dest_len) {
|
| }
|
|
|
| bool GZipFilter::InsertZlibHeader() {
|
| - static char dummy_head[2] = { 0x78, 0x1 };
|
| + static char dummy_head[2] = {0x78, 0x1};
|
|
|
| char dummy_output[4];
|
|
|
| @@ -281,7 +277,6 @@ bool GZipFilter::InsertZlibHeader() {
|
| return (code == Z_OK);
|
| }
|
|
|
| -
|
| void GZipFilter::SkipGZipFooter() {
|
| int footer_bytes_expected = kGZipFooterSize - gzip_footer_bytes_;
|
| if (footer_bytes_expected > 0) {
|
|
|