Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_FILTER_STREAM_SOURCE_UTIL_H | |
| 6 #define NET_FILTER_STREAM_SOURCE_UTIL_H | |
| 7 | |
| 8 #include <memory> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "net/filter/stream_source.h" | |
| 12 | |
| 13 namespace net { | |
| 14 | |
| 15 class HttpResponseHeaders; | |
| 16 | |
| 17 class StreamSourceUtil { | |
| 18 public: | |
| 19 // This method constructs a chain of StreamSources from a vector of | |
| 20 // Content-Type values and an SdchStreamSourceDelegate. If any of the | |
| 21 // constructed StreamSources are SdchStreamSources, they will be constructed | |
| 22 // with |delegate|. | |
|
Randy Smith (Not in Mondays)
2016/04/26 21:54:02
? There is no |delegate| in the argument list (an
xunjieli
2016/07/20 21:00:48
Done.
| |
| 23 static std::unique_ptr<StreamSource> BuildSourceChain( | |
| 24 std::unique_ptr<StreamSource> previous, | |
| 25 HttpResponseHeaders* headers); | |
|
Randy Smith (Not in Mondays)
2016/04/26 21:54:01
I have some urge to pull this functionality up int
xunjieli
2016/07/20 21:00:48
Done.
| |
| 26 | |
| 27 // Converts a StreamSource::SourceType to its string representation. | |
| 28 static std::string SourceTypeAsString(StreamSource::SourceType type); | |
|
Randy Smith (Not in Mondays)
2016/04/26 21:54:02
I suspect (haven't traced through the code) that t
xunjieli
2016/07/20 21:00:48
Done.
| |
| 29 | |
| 30 // Returns a string that represents the filter chain that starts at and | |
| 31 // includes |source|. | |
| 32 static std::string OrderedStreamSourceList(StreamSource* source); | |
|
Randy Smith (Not in Mondays)
2016/04/26 21:54:02
And similarly, I'd recommend having a virtual meth
xunjieli
2016/07/20 21:00:48
Done.
| |
| 33 }; | |
| 34 | |
| 35 } // namespace net | |
| 36 | |
| 37 #endif // NET_FILTER_STREAM_SOURCE_UTIL_H | |
| OLD | NEW |