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

Unified Diff: net/filter/filter.cc

Issue 953633002: Remove net::Filter direct dependency on IsSupportedMimeType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use NetworkDelegate::IsSupportedMimeType in net::Filter::FixupEncodingTypes Created 5 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
« no previous file with comments | « net/base/network_delegate_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/filter/filter.cc
diff --git a/net/filter/filter.cc b/net/filter/filter.cc
index b3f98cbcc6d501d9f46ba710bcf33828a770febd..edadc0f798d0def01d7355765c5817255eda314f 100644
--- a/net/filter/filter.cc
+++ b/net/filter/filter.cc
@@ -27,7 +27,6 @@
#include "base/strings/string_util.h"
#include "net/base/filename_util_unsafe.h"
#include "net/base/io_buffer.h"
-#include "net/base/mime_util.h"
#include "net/base/sdch_net_log_params.h"
#include "net/filter/gzip_filter.h"
#include "net/filter/sdch_filter.h"
@@ -249,9 +248,12 @@ void Filter::FixupEncodingTypes(
// However, if it's not a supported mime type, then we will attempt to
// download it, and in that case, don't decompress .gz/.tgz files.
if ((EndsWith(extension, FILE_PATH_LITERAL(".gz"), false) ||
- LowerCaseEqualsASCII(extension, ".tgz")) &&
- !IsSupportedMimeType(mime_type))
- encoding_types->clear();
+ LowerCaseEqualsASCII(extension, ".tgz"))) {
+ NetworkDelegate* net_delegate =
+ filter_context.GetURLRequestContext()->network_delegate();
+ if (net_delegate && !net_delegate->IsSupportedMimeType(mime_type))
+ encoding_types->clear();
+ }
}
}
« no previous file with comments | « net/base/network_delegate_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698