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

Unified Diff: net/base/sdch_manager.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/base/sdch_manager.cc
===================================================================
--- net/base/sdch_manager.cc (revision 9302)
+++ net/base/sdch_manager.cc (working copy)
@@ -172,10 +172,7 @@
return true;
}
-void SdchManager::FetchDictionary(const GURL& referring_url,
- const GURL& dictionary_url) {
- if (!CanFetchDictionary(referring_url, dictionary_url))
- return;
+void SdchManager::FetchDictionary(const GURL& dictionary_url) {
if (fetcher_.get())
fetcher_->Schedule(dictionary_url);
}
@@ -379,6 +376,11 @@
5. If the dictionary has a Port attribute and the referer URL's port was not
in the list.
*/
+
+ // TODO(jar): Redirects in dictionary fetches might plausibly be problematic,
+ // and hence the conservative approach is to not allow any redirects (if there
+ // were any... then don't allow the dictionary to be set).
+
if (domain.empty()) {
SdchErrorRecovery(DICTIONARY_MISSING_DOMAIN_SPECIFIER);
return false; // Domain is required.

Powered by Google App Engine
This is Rietveld 408576698