| Index: net/url_request/url_request_http_job.cc
|
| diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
|
| index 38950c2038ef3025a9b268e4f1e84ac0fd805123..d9a62440f1ba761571c09018449686b7afe0ab39 100644
|
| --- a/net/url_request/url_request_http_job.cc
|
| +++ b/net/url_request/url_request_http_job.cc
|
| @@ -23,6 +23,7 @@
|
| #include "net/base/net_util.h"
|
| #include "net/base/network_delegate.h"
|
| #include "net/base/sdch_manager.h"
|
| +#include "net/base/sdch_net_log_params.h"
|
| #include "net/cert/cert_status_flags.h"
|
| #include "net/cookies/cookie_store.h"
|
| #include "net/http/http_content_disposition.h"
|
| @@ -69,6 +70,7 @@ class URLRequestHttpJob::HttpFilterContext : public FilterContext {
|
| virtual int GetResponseCode() const OVERRIDE;
|
| virtual const URLRequestContext* GetURLRequestContext() const OVERRIDE;
|
| virtual void RecordPacketStats(StatisticSelector statistic) const OVERRIDE;
|
| + virtual const BoundNetLog& GetNetLog() const OVERRIDE;
|
|
|
| // Method to allow us to reset filter context for a response that should have
|
| // been SDCH encoded when there is an update due to an explicit HTTP header.
|
| @@ -77,6 +79,10 @@ class URLRequestHttpJob::HttpFilterContext : public FilterContext {
|
| private:
|
| URLRequestHttpJob* job_;
|
|
|
| + // URLRequestHttpJob may be detached from URLRequest, but we still need to
|
| + // return something.
|
| + BoundNetLog dummy_log_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(HttpFilterContext);
|
| };
|
|
|
| @@ -146,6 +152,10 @@ void URLRequestHttpJob::HttpFilterContext::RecordPacketStats(
|
| job_->RecordPacketStats(statistic);
|
| }
|
|
|
| +const BoundNetLog& URLRequestHttpJob::HttpFilterContext::GetNetLog() const {
|
| + return job_->request() ? job_->request()->net_log() : dummy_log_;
|
| +}
|
| +
|
| // TODO(darin): make sure the port blocking code is not lost
|
| // static
|
| URLRequestJob* URLRequestHttpJob::Factory(URLRequest* request,
|
| @@ -334,7 +344,16 @@ void URLRequestHttpJob::NotifyHeadersComplete() {
|
| // Resolve suggested URL relative to request url.
|
| GURL sdch_dictionary_url = request_->url().Resolve(url_text);
|
| if (sdch_dictionary_url.is_valid()) {
|
| - sdch_manager->FetchDictionary(request_->url(), sdch_dictionary_url);
|
| + SdchManager::ProblemCodes rv =
|
| + sdch_manager->FetchDictionary(request_->url(), sdch_dictionary_url);
|
| + if (rv != SdchManager::PROBLEM_CODE_OK) {
|
| + SdchManager::SdchErrorRecovery(rv);
|
| + request_->net_log().AddEvent(
|
| + NetLog::TYPE_SDCH_DICTIONARY_FETCH_ERROR,
|
| + base::Bind(&NetLogSdchDictionaryFetchProblemCallback,
|
| + rv,
|
| + &sdch_dictionary_url));
|
| + }
|
| }
|
| }
|
| }
|
|
|