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

Unified Diff: net/url_request/url_request_file_job.cc

Issue 6674042: Make URLRequestHttpJob the only URLRequestJob concerned with FilterContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Responded to comments from willchan Created 9 years, 9 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/url_request/url_request_file_job.cc
diff --git a/net/url_request/url_request_file_job.cc b/net/url_request/url_request_file_job.cc
index c8e90c17b9fe4e6365383429aac4fc3099e4218f..47ef980260e00ee1e24c198be650e73ae344709b 100644
--- a/net/url_request/url_request_file_job.cc
+++ b/net/url_request/url_request_file_job.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -263,15 +263,10 @@ bool URLRequestFileJob::IsRedirectResponse(GURL* location,
#endif
}
-bool URLRequestFileJob::GetContentEncodings(
- std::vector<Filter::FilterType>* encoding_types) {
- DCHECK(encoding_types->empty());
-
+Filter* URLRequestFileJob::SetupFilter() const {
// 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();
+ return LowerCaseEqualsASCII(file_path_.Extension(), ".svgz")
+ ? Filter::GZipFactory() : NULL;
}
bool URLRequestFileJob::GetMimeType(std::string* mime_type) const {

Powered by Google App Engine
This is Rietveld 408576698