Chromium Code Reviews| Index: net/filter/stream_source_util.h |
| diff --git a/net/filter/stream_source_util.h b/net/filter/stream_source_util.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..071d5402327552b902e58457442fcc7bb47954ea |
| --- /dev/null |
| +++ b/net/filter/stream_source_util.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef NET_FILTER_STREAM_SOURCE_UTIL_H |
| +#define NET_FILTER_STREAM_SOURCE_UTIL_H |
| + |
| +#include <memory> |
| +#include <vector> |
| + |
| +#include "net/filter/stream_source.h" |
| + |
| +namespace net { |
| + |
| +class HttpResponseHeaders; |
| + |
| +class StreamSourceUtil { |
| + public: |
| + // This method constructs a chain of StreamSources from a vector of |
| + // Content-Type values and an SdchStreamSourceDelegate. If any of the |
| + // constructed StreamSources are SdchStreamSources, they will be constructed |
| + // 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.
|
| + static std::unique_ptr<StreamSource> BuildSourceChain( |
| + std::unique_ptr<StreamSource> previous, |
| + 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.
|
| + |
| + // Converts a StreamSource::SourceType to its string representation. |
| + 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.
|
| + |
| + // Returns a string that represents the filter chain that starts at and |
| + // includes |source|. |
| + 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.
|
| +}; |
| + |
| +} // namespace net |
| + |
| +#endif // NET_FILTER_STREAM_SOURCE_UTIL_H |