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

Unified Diff: net/filter/stream_source_util.h

Issue 1662763002: [ON HOLD] Implement pull-based design for content decoding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698