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

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

Issue 6347033: net: Add namespace net to Sdch* classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: namespace on unittest Created 9 years, 10 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
OLDNEW
1 // Copyright (c) 2006-2008 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"
6
5 #include <limits.h> 7 #include <limits.h>
6 #include <ctype.h> 8 #include <ctype.h>
7 #include <algorithm> 9 #include <algorithm>
8 10
9 #include "base/file_util.h" 11 #include "base/file_util.h"
10 #include "base/logging.h" 12 #include "base/logging.h"
11 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
12 #include "net/base/sdch_filter.h"
13 #include "net/base/sdch_manager.h" 14 #include "net/base/sdch_manager.h"
14 15
15 #include "sdch/open-vcdiff/src/google/vcdecoder.h" 16 #include "sdch/open-vcdiff/src/google/vcdecoder.h"
16 17
18 namespace net {
19
17 SdchFilter::SdchFilter(const FilterContext& filter_context) 20 SdchFilter::SdchFilter(const FilterContext& filter_context)
18 : Filter(filter_context), 21 : Filter(filter_context),
19 decoding_status_(DECODING_UNINITIALIZED), 22 decoding_status_(DECODING_UNINITIALIZED),
20 vcdiff_streaming_decoder_(NULL), 23 vcdiff_streaming_decoder_(NULL),
21 dictionary_hash_(), 24 dictionary_hash_(),
22 dictionary_hash_is_plausible_(false), 25 dictionary_hash_is_plausible_(false),
23 dictionary_(NULL), 26 dictionary_(NULL),
24 dest_buffer_excess_(), 27 dest_buffer_excess_(),
25 dest_buffer_excess_index_(0), 28 dest_buffer_excess_index_(0),
26 source_bytes_(0), 29 source_bytes_(0),
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 memcpy(dest_buffer, dest_buffer_excess_.data() + dest_buffer_excess_index_, 379 memcpy(dest_buffer, dest_buffer_excess_.data() + dest_buffer_excess_index_,
377 amount); 380 amount);
378 dest_buffer_excess_index_ += amount; 381 dest_buffer_excess_index_ += amount;
379 if (dest_buffer_excess_.size() <= dest_buffer_excess_index_) { 382 if (dest_buffer_excess_.size() <= dest_buffer_excess_index_) {
380 DCHECK(dest_buffer_excess_.size() == dest_buffer_excess_index_); 383 DCHECK(dest_buffer_excess_.size() == dest_buffer_excess_index_);
381 dest_buffer_excess_.clear(); 384 dest_buffer_excess_.clear();
382 dest_buffer_excess_index_ = 0; 385 dest_buffer_excess_index_ = 0;
383 } 386 }
384 return amount; 387 return amount;
385 } 388 }
389
390 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698