diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-05 00:19:40 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-05 00:19:40 +0000 |
commit | 2abcade13437abb0a3b92cb0b7236b3dd5f1a236 (patch) | |
tree | 268c2baca793e8e865d4b24c69376cf212927133 /webkit/appcache/appcache_host.cc | |
parent | 17e6cde51ff33a5dac5290e978c4e7acf08a473c (diff) | |
download | chromium_src-2abcade13437abb0a3b92cb0b7236b3dd5f1a236.zip chromium_src-2abcade13437abb0a3b92cb0b7236b3dd5f1a236.tar.gz chromium_src-2abcade13437abb0a3b92cb0b7236b3dd5f1a236.tar.bz2 |
Fix some loose ends around recently introduced AppCache INTERCEPT namespaces
- if an intercept entry cant be fetched, the appcache update should fail
- properly mark the intercept entry as FORIEGN when thats detected
BUG=101565
Review URL: http://codereview.chromium.org/8949001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116417 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_host.cc')
-rw-r--r-- | webkit/appcache/appcache_host.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/webkit/appcache/appcache_host.cc b/webkit/appcache/appcache_host.cc index b9cae76..ff0cb3e 100644 --- a/webkit/appcache/appcache_host.cc +++ b/webkit/appcache/appcache_host.cc @@ -50,7 +50,8 @@ AppCacheHost::AppCacheHost(int host_id, AppCacheFrontend* frontend, pending_selected_cache_id_(kNoCacheId), frontend_(frontend), service_(service), pending_callback_param_(NULL), - main_resource_was_fallback_(false), main_resource_blocked_(false), + main_resource_was_namespace_entry_(false), + main_resource_blocked_(false), associated_cache_info_pending_(false) { } @@ -160,7 +161,7 @@ void AppCacheHost::MarkAsForeignEntry(const GURL& document_url, int64 cache_document_was_loaded_from) { // The document url is not the resource url in the fallback case. service_->storage()->MarkEntryAsForeign( - main_resource_was_fallback_ ? fallback_url_ : document_url, + main_resource_was_namespace_entry_ ? namespace_entry_url_ : document_url, cache_document_was_loaded_from); SelectCache(document_url, kNoCacheId, GURL()); } @@ -464,9 +465,10 @@ void AppCacheHost::LoadMainResourceCache(int64 cache_id) { service_->storage()->LoadCache(cache_id, this); } -void AppCacheHost::NotifyMainResourceFallback(const GURL& fallback_url) { - main_resource_was_fallback_ = true; - fallback_url_ = fallback_url; +void AppCacheHost::NotifyMainResourceIsNamespaceEntry( + const GURL& namespace_entry_url) { + main_resource_was_namespace_entry_ = true; + namespace_entry_url_ = namespace_entry_url; } void AppCacheHost::NotifyMainResourceBlocked(const GURL& manifest_url) { |