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

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

Issue 5402: Transition to pulling open-vcdiff rather than using a private snapshot pull... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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 | « DEPS ('k') | sdch/SConscript » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/histogram.h" 8 #include "base/histogram.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "net/base/sdch_filter.h" 10 #include "net/base/sdch_filter.h"
11 #include "net/base/sdch_manager.h" 11 #include "net/base/sdch_manager.h"
12 12
13 #include "sdch/open_vcdiff/depot/opensource/open-vcdiff/src/google/vcdecoder.h" 13 #include "sdch/open-vcdiff/src/google/vcdecoder.h"
14 14
15 SdchFilter::SdchFilter() 15 SdchFilter::SdchFilter()
16 : decoding_status_(DECODING_UNINITIALIZED), 16 : decoding_status_(DECODING_UNINITIALIZED),
17 vcdiff_streaming_decoder_(NULL), 17 vcdiff_streaming_decoder_(NULL),
18 dictionary_(NULL), 18 dictionary_(NULL),
19 dest_buffer_excess_(), 19 dest_buffer_excess_(),
20 dest_buffer_excess_index_(0), 20 dest_buffer_excess_index_(0),
21 source_bytes_(0), 21 source_bytes_(0),
22 output_bytes_(0) { 22 output_bytes_(0) {
23 } 23 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 memcpy(dest_buffer, dest_buffer_excess_.data() + dest_buffer_excess_index_, 159 memcpy(dest_buffer, dest_buffer_excess_.data() + dest_buffer_excess_index_,
160 amount); 160 amount);
161 dest_buffer_excess_index_ += amount; 161 dest_buffer_excess_index_ += amount;
162 if (dest_buffer_excess_.size() <= dest_buffer_excess_index_) { 162 if (dest_buffer_excess_.size() <= dest_buffer_excess_index_) {
163 DCHECK(dest_buffer_excess_.size() == dest_buffer_excess_index_); 163 DCHECK(dest_buffer_excess_.size() == dest_buffer_excess_index_);
164 dest_buffer_excess_.clear(); 164 dest_buffer_excess_.clear();
165 dest_buffer_excess_index_ = 0; 165 dest_buffer_excess_index_ = 0;
166 } 166 }
167 return amount; 167 return amount;
168 } 168 }
OLDNEW
« no previous file with comments | « DEPS ('k') | sdch/SConscript » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698