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

Side by Side Diff: net/filter/filter.cc

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // The basic usage of the Filter interface is described in the comment at 5 // The basic usage of the Filter interface is described in the comment at
6 // the beginning of filter.h. If Filter::Factory is passed a vector of 6 // the beginning of filter.h. If Filter::Factory is passed a vector of
7 // size greater than 1, that interface is implemented by a series of filters 7 // size greater than 1, that interface is implemented by a series of filters
8 // connected in a chain. In such a case the first filter 8 // connected in a chain. In such a case the first filter
9 // in the chain proxies calls to ReadData() so that its return values 9 // in the chain proxies calls to ReadData() so that its return values
10 // apply to the entire chain. 10 // apply to the entire chain.
(...skipping 14 matching lines...) Expand all
25 25
26 #include "base/files/file_path.h" 26 #include "base/files/file_path.h"
27 #include "base/strings/string_util.h" 27 #include "base/strings/string_util.h"
28 #include "base/values.h" 28 #include "base/values.h"
29 #include "net/base/io_buffer.h" 29 #include "net/base/io_buffer.h"
30 #include "net/base/sdch_net_log_params.h" 30 #include "net/base/sdch_net_log_params.h"
31 #include "net/filter/brotli_filter.h" 31 #include "net/filter/brotli_filter.h"
32 #include "net/filter/gzip_filter.h" 32 #include "net/filter/gzip_filter.h"
33 #include "net/filter/sdch_filter.h" 33 #include "net/filter/sdch_filter.h"
34 #include "net/log/net_log_event_type.h" 34 #include "net/log/net_log_event_type.h"
35 #include "net/log/net_log_with_source.h"
35 #include "net/url_request/url_request_context.h" 36 #include "net/url_request/url_request_context.h"
36 #include "url/gurl.h" 37 #include "url/gurl.h"
37 38
38 namespace net { 39 namespace net {
39 40
40 namespace { 41 namespace {
41 42
42 // Filter types (using canonical lower case only): 43 // Filter types (using canonical lower case only):
43 const char kBrotli[] = "br"; 44 const char kBrotli[] = "br";
44 const char kDeflate[] = "deflate"; 45 const char kDeflate[] = "deflate";
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 444
444 void Filter::PushDataIntoNextFilter() { 445 void Filter::PushDataIntoNextFilter() {
445 IOBuffer* next_buffer = next_filter_->stream_buffer(); 446 IOBuffer* next_buffer = next_filter_->stream_buffer();
446 int next_size = next_filter_->stream_buffer_size(); 447 int next_size = next_filter_->stream_buffer_size();
447 last_status_ = ReadFilteredData(next_buffer->data(), &next_size); 448 last_status_ = ReadFilteredData(next_buffer->data(), &next_size);
448 if (FILTER_ERROR != last_status_) 449 if (FILTER_ERROR != last_status_)
449 next_filter_->FlushStreamBuffer(next_size); 450 next_filter_->FlushStreamBuffer(next_size);
450 } 451 }
451 452
452 } // namespace net 453 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698