summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request_job.h
diff options
context:
space:
mode:
authoradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-17 01:24:05 +0000
committeradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-17 01:24:05 +0000
commit5a3b4d3d89a226326174279ba1478ee069d015be (patch)
tree18f94db862326c21d522000e8fc5445ee4834f1a /net/url_request/url_request_job.h
parent6acaea63ab984c081f40a6f20d04196ade867188 (diff)
downloadchromium_src-5a3b4d3d89a226326174279ba1478ee069d015be.zip
chromium_src-5a3b4d3d89a226326174279ba1478ee069d015be.tar.gz
chromium_src-5a3b4d3d89a226326174279ba1478ee069d015be.tar.bz2
Make URLRequestHttpJob the only URLRequestJob concerned with FilterContext.
In order to allow this, provide a new factory method in Filter to return a GZipFilter (used by URLRequestFileJob and URLRequestJobTrackerTest), and invert control so that URLRequestJobs are responsible for constructing filters. This is one step away from removing FilterContext as a base class of URLRequestJob, which will be tackled in a followup change. BUG=none TEST=net_unittests Review URL: http://codereview.chromium.org/6674042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78489 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_job.h')
-rw-r--r--net/url_request/url_request_job.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h
index 3b65f8b..49b3e6c 100644
--- a/net/url_request/url_request_job.h
+++ b/net/url_request/url_request_job.h
@@ -115,22 +115,13 @@ class URLRequestJob : public base::RefCounted<URLRequestJob>,
// useful results once per job.
virtual bool GetResponseCookies(std::vector<std::string>* cookies);
- // Called to fetch the encoding types for this request. Only makes sense for
- // 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, 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);
-
- // Called to setup stream filter for this request. An example of filter is
+ // Called to setup a stream filter for this request. An example of filter is
// content encoding/decoding.
- void SetupFilter();
+ // Subclasses should return the appropriate Filter, or NULL for no Filter.
+ // This class takes ownership of the returned Filter.
+ //
+ // The default implementation returns NULL.
+ virtual Filter* SetupFilter() const;
// Called to determine if this response is a redirect. Only makes sense
// for some types of requests. This method returns true if the response