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 |