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

Unified Diff: net/base/filter.cc

Issue 62111: Give the filter setup more context so it can figure out whether it's download... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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
Index: net/base/filter.cc
===================================================================
--- net/base/filter.cc (revision 13526)
+++ net/base/filter.cc (working copy)
@@ -104,9 +104,14 @@
// Firefox does not apply the filter to the following extensions.
// See Firefox's nsHttpChannel::nsContentEncodings::GetNext() and
// nonDecodableExtensions in nsExternalHelperAppService.cpp
+ // For the case of svgz files, we use the extension to distinguish
+ // between svgz files and svg files compressed with gzip by the server.
+ // When viewing a .svgz file, we need to uncompress it, but we don't
+ // want to do that when downloading.
if (0 == extension.compare(FILE_PATH_LITERAL(".gz")) ||
0 == extension.compare(FILE_PATH_LITERAL(".tgz")) ||
- 0 == extension.compare(FILE_PATH_LITERAL(".svgz"))) {
+ (0 == extension.compare(FILE_PATH_LITERAL(".svgz")) &&
+ filter_context.IsDownload())) {
encoding_types->clear();
}
}
« no previous file with comments | « net/base/filter.h ('k') | net/base/filter_unittest.h » ('j') | net/url_request/url_request_job.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698