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

Unified Diff: content/browser/webui/url_data_manager_backend.cc

Issue 2373003003: Switch to use net::FilterSourceStream from net::Filter (Closed)
Patch Set: rebased onto sdch fix Created 4 years, 2 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
« no previous file with comments | « no previous file | net/base/net_error_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/url_data_manager_backend.cc
diff --git a/content/browser/webui/url_data_manager_backend.cc b/content/browser/webui/url_data_manager_backend.cc
index 84fcef5d11344b224795da4762efdf682ee98b61..0eb8db377808e99c3d2a3b77a11eeb67986fe341 100644
--- a/content/browser/webui/url_data_manager_backend.cc
+++ b/content/browser/webui/url_data_manager_backend.cc
@@ -41,7 +41,8 @@
#include "content/public/common/url_constants.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
-#include "net/filter/filter.h"
+#include "net/filter/gzip_source_stream.h"
+#include "net/filter/source_stream.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_status_code.h"
#include "net/log/net_log_util.h"
@@ -143,7 +144,7 @@ class URLRequestChromeJob : public net::URLRequestJob {
bool GetMimeType(std::string* mime_type) const override;
int GetResponseCode() const override;
void GetResponseInfo(net::HttpResponseInfo* info) override;
- std::unique_ptr<net::Filter> SetupFilter() const override;
+ std::unique_ptr<net::SourceStream> SetUpSourceStream() override;
// Used to notify that the requested data's |mime_type| is ready.
void MimeTypeAvailable(const std::string& mime_type);
@@ -393,8 +394,12 @@ void URLRequestChromeJob::GetResponseInfo(net::HttpResponseInfo* info) {
info->headers->AddHeader("Content-Encoding: gzip");
}
-std::unique_ptr<net::Filter> URLRequestChromeJob::SetupFilter() const {
- return is_gzipped_ ? net::Filter::GZipFactory() : nullptr;
+std::unique_ptr<net::SourceStream> URLRequestChromeJob::SetUpSourceStream() {
+ std::unique_ptr<net::SourceStream> source =
+ net::URLRequestJob::SetUpSourceStream();
+ return is_gzipped_ ? net::GzipSourceStream::Create(
+ std::move(source), net::SourceStream::TYPE_GZIP)
+ : std::move(source);
}
void URLRequestChromeJob::MimeTypeAvailable(const std::string& mime_type) {
« no previous file with comments | « no previous file | net/base/net_error_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698