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 8c76efb1febb8d8c920d0934128b4f177653926a..57c666354fbf74aeac5dba6f3a0670bf7bfccfc7 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 void LogSdchProblem(SdchManager::ProblemCodes problem) 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. |
@@ -146,6 +148,15 @@ void URLRequestHttpJob::HttpFilterContext::RecordPacketStats( |
job_->RecordPacketStats(statistic); |
} |
+void URLRequestHttpJob::HttpFilterContext::LogSdchProblem( |
+ SdchManager::ProblemCodes problem) const { |
+ SdchManager::SdchErrorRecovery(problem); |
+ if (job_->request()) |
+ job_->request()->net_log().AddEvent( |
+ NetLog::TYPE_SDCH_RESOURCE_ERROR, |
+ base::Bind(&NetLogSdchResourceProblemCallback, problem)); |
+} |
+ |
// TODO(darin): make sure the port blocking code is not lost |
// static |
URLRequestJob* URLRequestHttpJob::Factory(URLRequest* request, |
@@ -334,7 +345,17 @@ 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); |
+ if (request_) |
Randy Smith (Not in Mondays)
2014/08/05 17:50:34
We've indirected request_ several lines above; eit
baranovich
2014/08/12 20:54:50
Done.
|
+ request_->net_log().AddEvent( |
+ NetLog::TYPE_SDCH_DICTIONARY_FETCH_ERROR, |
+ base::Bind(&NetLogSdchDictionaryFetchProblemCallback, |
+ rv, |
+ &sdch_dictionary_url)); |
+ } |
} |
} |
} |