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

Unified Diff: net/url_request/url_request_file_job.cc

Issue 99109: Decompress .svgz files from disk. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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/url_request/url_request_file_job.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_file_job.cc
===================================================================
--- net/url_request/url_request_file_job.cc (revision 15763)
+++ net/url_request/url_request_file_job.cc (working copy)
@@ -167,6 +167,17 @@
return false;
}
+bool URLRequestFileJob::GetContentEncodings(
+ std::vector<Filter::FilterType>* encoding_types) {
+ DCHECK(encoding_types->empty());
+
+ // Bug 9936 - .svgz files needs to be decompressed.
+ if (LowerCaseEqualsASCII(file_path_.Extension(), ".svgz"))
+ encoding_types->push_back(Filter::FILTER_TYPE_GZIP);
+
+ return !encoding_types->empty();
+}
+
bool URLRequestFileJob::GetMimeType(std::string* mime_type) const {
DCHECK(request_);
return net::GetMimeTypeFromFile(file_path_, mime_type);
« no previous file with comments | « net/url_request/url_request_file_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698