diff options
Diffstat (limited to 'net/url_request/url_request_job.cc')
-rw-r--r-- | net/url_request/url_request_job.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc index 0501286..b0517ba 100644 --- a/net/url_request/url_request_job.cc +++ b/net/url_request/url_request_job.cc @@ -47,13 +47,11 @@ void URLRequestJob::DetachRequest() { } void URLRequestJob::SetupFilter() { - std::vector<std::string> encoding_types; - if (GetContentEncodings(&encoding_types)) { + std::string encoding_type; + if (GetContentEncoding(&encoding_type)) { std::string mime_type; GetMimeType(&mime_type); - filter_.reset(Filter::Factory(encoding_types, mime_type, kFilterBufSize)); - if (filter_.get()) - filter_->SetURL(request_->url()); + filter_.reset(Filter::Factory(encoding_type, mime_type, kFilterBufSize)); } } @@ -176,7 +174,7 @@ bool URLRequestJob::ReadFilteredData(int *bytes_read) { // Get filtered data int filtered_data_len = read_buffer_len_; Filter::FilterStatus status; - status = filter_->ReadData(read_buffer_, &filtered_data_len); + status = filter_->ReadFilteredData(read_buffer_, &filtered_data_len); switch (status) { case Filter::FILTER_DONE: { *bytes_read = filtered_data_len; |