OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/filter/filter_source_stream.h" | 5 #include "net/filter/filter_source_stream.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 return rv; | 60 return rv; |
61 } | 61 } |
62 | 62 |
63 std::string FilterSourceStream::Description() const { | 63 std::string FilterSourceStream::Description() const { |
64 std::string next_type_string = upstream_->Description(); | 64 std::string next_type_string = upstream_->Description(); |
65 if (next_type_string.empty()) | 65 if (next_type_string.empty()) |
66 return GetTypeAsString(); | 66 return GetTypeAsString(); |
67 return next_type_string + "," + GetTypeAsString(); | 67 return next_type_string + "," + GetTypeAsString(); |
68 } | 68 } |
69 | 69 |
| 70 void FilterSourceStream::DumpMemoryStats( |
| 71 base::trace_event::ProcessMemoryDump* pmd, |
| 72 const std::string& parent_dump_absolute_name) const { |
| 73 DumpMemoryStatsImpl(pmd, parent_dump_absolute_name); |
| 74 upstream_->DumpMemoryStats(pmd, parent_dump_absolute_name); |
| 75 } |
| 76 |
70 int FilterSourceStream::DoLoop(int result) { | 77 int FilterSourceStream::DoLoop(int result) { |
71 DCHECK_NE(STATE_NONE, next_state_); | 78 DCHECK_NE(STATE_NONE, next_state_); |
72 | 79 |
73 int rv = result; | 80 int rv = result; |
74 do { | 81 do { |
75 State state = next_state_; | 82 State state = next_state_; |
76 next_state_ = STATE_NONE; | 83 next_state_ = STATE_NONE; |
77 switch (state) { | 84 switch (state) { |
78 case STATE_READ_DATA: | 85 case STATE_READ_DATA: |
79 rv = DoReadData(); | 86 rv = DoReadData(); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 output_buffer_ = nullptr; | 173 output_buffer_ = nullptr; |
167 output_buffer_size_ = 0; | 174 output_buffer_size_ = 0; |
168 | 175 |
169 base::ResetAndReturn(&callback_).Run(rv); | 176 base::ResetAndReturn(&callback_).Run(rv); |
170 } | 177 } |
171 | 178 |
172 bool FilterSourceStream::NeedMoreData() const { | 179 bool FilterSourceStream::NeedMoreData() const { |
173 return !upstream_end_reached_; | 180 return !upstream_end_reached_; |
174 } | 181 } |
175 | 182 |
| 183 void FilterSourceStream::DumpMemoryStatsImpl( |
| 184 base::trace_event::ProcessMemoryDump* pmd, |
| 185 const std::string& parent_dump_absolute_name) const {} |
| 186 |
176 } // namespace net | 187 } // namespace net |
OLD | NEW |