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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 1662763002: [ON HOLD] Implement pull-based design for content decoding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/url_request/url_request_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 68d5ed9e898ec47c298f481c212359d1b5c3f654..b0656021caf3d578a06cd03324585903a279d7bd 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -1168,6 +1168,7 @@ void URLRequestHttpJob::PopulateNetErrorDetails(
return transaction_->PopulateNetErrorDetails(details);
}
+#if 0
Filter* URLRequestHttpJob::SetupFilter() const {
DCHECK(transaction_.get());
if (!response_info_)
@@ -1190,6 +1191,23 @@ Filter* URLRequestHttpJob::SetupFilter() const {
return !encoding_types.empty()
? Filter::Factory(encoding_types, *filter_context_) : NULL;
}
+#endif
+scoped_ptr<StreamSource> URLRequestHttpJob::SetupSource() {
+ DCHECK(transaction_.get());
+ if (!response_info_)
+ return NULL;
+
+ std::string encoding_type;
+ std::vector<std::string> encoding_types;
+ HttpResponseHeaders* headers = GetResponseHeaders();
+ size_t iter = 0;
+ while (headers->EnumerateHeader(&iter, "Content-Encoding", &encoding_type)) {
+ encoding_types.push_back(base::ToLowerASCII(encoding_type));
+ }
+
+ return StreamSource::BuildSourceChain(URLRequestJob::SetupSource(),
+ encoding_types, nullptr);
+}
bool URLRequestHttpJob::CopyFragmentOnRedirect(const GURL& location) const {
// Allow modification of reference fragments by default, unless

Powered by Google App Engine
This is Rietveld 408576698