summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request_job.cc
diff options
context:
space:
mode:
authorjar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-23 01:18:16 +0000
committerjar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-23 01:18:16 +0000
commit6088942a9ddd522ed237b805641138f853fc3a7f (patch)
tree38f2078177a0e30fecf4edeaacdda5704a067607 /net/url_request/url_request_job.cc
parent9516babc4a834ec72508b35fb86741f9254f5419 (diff)
downloadchromium_src-6088942a9ddd522ed237b805641138f853fc3a7f.zip
chromium_src-6088942a9ddd522ed237b805641138f853fc3a7f.tar.gz
chromium_src-6088942a9ddd522ed237b805641138f853fc3a7f.tar.bz2
Re-land SDCH filter support experiment
Fix up solution files for webkit and net Add one line keyword change to help linux build r=hunanr,openvcdiff,nsylvain Review URL: http://codereview.chromium.org/4026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2469 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_job.cc')
-rw-r--r--net/url_request/url_request_job.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc
index b0517ba..0501286 100644
--- a/net/url_request/url_request_job.cc
+++ b/net/url_request/url_request_job.cc
@@ -47,11 +47,13 @@ void URLRequestJob::DetachRequest() {
}
void URLRequestJob::SetupFilter() {
- std::string encoding_type;
- if (GetContentEncoding(&encoding_type)) {
+ std::vector<std::string> encoding_types;
+ if (GetContentEncodings(&encoding_types)) {
std::string mime_type;
GetMimeType(&mime_type);
- filter_.reset(Filter::Factory(encoding_type, mime_type, kFilterBufSize));
+ filter_.reset(Filter::Factory(encoding_types, mime_type, kFilterBufSize));
+ if (filter_.get())
+ filter_->SetURL(request_->url());
}
}
@@ -174,7 +176,7 @@ bool URLRequestJob::ReadFilteredData(int *bytes_read) {
// Get filtered data
int filtered_data_len = read_buffer_len_;
Filter::FilterStatus status;
- status = filter_->ReadFilteredData(read_buffer_, &filtered_data_len);
+ status = filter_->ReadData(read_buffer_, &filtered_data_len);
switch (status) {
case Filter::FILTER_DONE: {
*bytes_read = filtered_data_len;