diff options
author | jar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-27 17:39:28 +0000 |
---|---|---|
committer | jar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-27 17:39:28 +0000 |
commit | 423041b0a7182411149472ae1e7fd87317173097 (patch) | |
tree | 494092141aa32f87e6bf02159579ae590d0a3fbf /net/url_request/url_request_job.h | |
parent | c05ef7e4fe5aaadb4193217209a11440bd4d2c27 (diff) | |
download | chromium_src-423041b0a7182411149472ae1e7fd87317173097.zip chromium_src-423041b0a7182411149472ae1e7fd87317173097.tar.gz chromium_src-423041b0a7182411149472ae1e7fd87317173097.tar.bz2 |
Clean up filter and content encoding handling
Centralize translation functions (text of "Content-Encoding" to enum)
in filter.cc
Centralize error recovery (for damaged content encoding headers) in filter.cc
Error recovery includes a loss of SDCH encoding headers, plus handling
of Apache server bug with gzip files are tagged as also being gzip encoded.
Centralize and add a pile of unit tests to this filter code.
r=openvcdiff,huanr
Review URL: http://codereview.chromium.org/8018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4004 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_job.h')
-rw-r--r-- | net/url_request/url_request_job.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h index 2df62fd..6b309be 100644 --- a/net/url_request/url_request_job.h +++ b/net/url_request/url_request_job.h @@ -114,12 +114,14 @@ class URLRequestJob : public base::RefCountedThreadSafe<URLRequestJob> { // some types of requests. Returns true on success. Calling this on a request // that doesn't have or specify an encoding type will return false. // Returns a array of strings showing the sequential encodings used on the - // content. For example, types[0] = "sdch" and types[1] = gzip, means the - // content was first encoded by sdch, and then encoded by gzip. To decode, - // a series of filters must be applied in the reverse order (in the above - // example, ungzip first, and then sdch expand). - // TODO(jar): Cleaner API would return an array of enums. - virtual bool GetContentEncodings(std::vector<std::string>* encoding_types) { + // content. + // For example, encoding_types[0] = FILTER_TYPE_SDCH and encoding_types[1] = + // FILTER_TYPE_GZIP, means the content was first encoded by sdch, and then + // result was encoded by gzip. To decode, a series of filters must be applied + // in the reverse order (in the above example, ungzip first, and then sdch + // expand). + virtual bool GetContentEncodings( + std::vector<Filter::FilterType>* encoding_types) { return false; } |