Chromium Code Reviews| Index: net/url_request/url_request_http_job.cc |
| =================================================================== |
| --- net/url_request/url_request_http_job.cc (revision 9596) |
| +++ net/url_request/url_request_http_job.cc (working copy) |
| @@ -64,6 +64,9 @@ |
| } |
| URLRequestHttpJob::~URLRequestHttpJob() { |
| + if (sdch_dictionary_url_.is_valid()) { |
| + SdchManager::Global()->FetchDictionary(sdch_dictionary_url_); |
|
Lincoln
2009/02/17 21:43:50
Could this cause a crash if, when the browser is s
|
| + } |
| } |
| void URLRequestHttpJob::SetUpload(net::UploadData* upload) { |
| @@ -445,7 +448,6 @@ |
| } |
| } |
| - // Get list of SDCH dictionary requests, and schedule them to be loaded. |
| if (SdchManager::Global() && |
| SdchManager::Global()->IsInSupportedDomain(request_->url())) { |
| static const std::string name = "Get-Dictionary"; |
| @@ -459,7 +461,9 @@ |
| // before we even download it (so that we don't waste memory or bandwidth). |
| if (response_info_->headers->EnumerateHeader(&iter, name, &url_text)) { |
| GURL dictionary_url = request_->url().Resolve(url_text); |
| - SdchManager::Global()->FetchDictionary(request_->url(), dictionary_url); |
| + if (SdchManager::Global()->CanFetchDictionary(request_->url(), |
| + dictionary_url)) |
| + sdch_dictionary_url_ = dictionary_url; |
| } |
| } |