Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(568)

Unified Diff: net/url_request/url_request_http_job.cc

Issue 20254: Fetch SDCH dictionary as soon as current URL fetch completes... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
}
« net/url_request/url_request_http_job.h ('K') | « net/url_request/url_request_http_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698