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

Unified Diff: net/base/network_delegate.h

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/layered_network_delegate.cc ('k') | net/base/network_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_delegate.h
diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h
index 5af2ac140efa5b6f5e0d4fe897d413f7fb31bdde..c465341c817c89ffaf3d46051bc20390eecbf2cf 100644
--- a/net/base/network_delegate.h
+++ b/net/base/network_delegate.h
@@ -109,6 +109,12 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
const GURL& target_url,
const GURL& referrer_url) const;
+ // If we get a response with GZIP encoding, we check if the response mime
+ // type is one of the supported mime types. If it is supported, we will
+ // decompress response to allow it to be displayed directly in browser,
+ // otherwise we'll leave it compressed.
+ bool IsSupportedMimeType(const std::string& mime_type) const;
+
private:
// This is the interface for subclasses of NetworkDelegate to implement. These
// member functions will be called by the respective public notification
@@ -275,6 +281,8 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
const URLRequest& request,
const GURL& target_url,
const GURL& referrer_url) const = 0;
+
+ virtual bool OnIsSupportedMimeType(const std::string& mime_type) const = 0;
};
} // namespace net
« no previous file with comments | « net/base/layered_network_delegate.cc ('k') | net/base/network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698