Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Side by Side Diff: net/base/sdch_filter.cc

Issue 16434016: Rewrite scoped_ptr<T>(NULL) to use the default ctor in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/filter.cc ('k') | net/disk_cache/simple/simple_index_file.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "net/base/sdch_filter.h" 5 #include "net/base/sdch_filter.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <ctype.h> 8 #include <ctype.h>
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "net/base/sdch_manager.h" 13 #include "net/base/sdch_manager.h"
14 14
15 #include "sdch/open-vcdiff/src/google/vcdecoder.h" 15 #include "sdch/open-vcdiff/src/google/vcdecoder.h"
16 16
17 namespace net { 17 namespace net {
18 18
19 SdchFilter::SdchFilter(const FilterContext& filter_context) 19 SdchFilter::SdchFilter(const FilterContext& filter_context)
20 : filter_context_(filter_context), 20 : filter_context_(filter_context),
21 decoding_status_(DECODING_UNINITIALIZED), 21 decoding_status_(DECODING_UNINITIALIZED),
22 vcdiff_streaming_decoder_(NULL),
23 dictionary_hash_(), 22 dictionary_hash_(),
24 dictionary_hash_is_plausible_(false), 23 dictionary_hash_is_plausible_(false),
25 dictionary_(NULL), 24 dictionary_(NULL),
26 dest_buffer_excess_(), 25 dest_buffer_excess_(),
27 dest_buffer_excess_index_(0), 26 dest_buffer_excess_index_(0),
28 source_bytes_(0), 27 source_bytes_(0),
29 output_bytes_(0), 28 output_bytes_(0),
30 possible_pass_through_(false) { 29 possible_pass_through_(false) {
31 bool success = filter_context.GetMimeType(&mime_type_); 30 bool success = filter_context.GetMimeType(&mime_type_);
32 DCHECK(success); 31 DCHECK(success);
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 dest_buffer_excess_index_ += amount; 379 dest_buffer_excess_index_ += amount;
381 if (dest_buffer_excess_.size() <= dest_buffer_excess_index_) { 380 if (dest_buffer_excess_.size() <= dest_buffer_excess_index_) {
382 DCHECK(dest_buffer_excess_.size() == dest_buffer_excess_index_); 381 DCHECK(dest_buffer_excess_.size() == dest_buffer_excess_index_);
383 dest_buffer_excess_.clear(); 382 dest_buffer_excess_.clear();
384 dest_buffer_excess_index_ = 0; 383 dest_buffer_excess_index_ = 0;
385 } 384 }
386 return amount; 385 return amount;
387 } 386 }
388 387
389 } // namespace net 388 } // namespace net
OLDNEW
« no previous file with comments | « net/base/filter.cc ('k') | net/disk_cache/simple/simple_index_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698