diff options
author | jennb@chromium.org <jennb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-01 23:55:04 +0000 |
---|---|---|
committer | jennb@chromium.org <jennb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-01 23:55:04 +0000 |
commit | 2cd1b419704881832767acda830bd817fcaa5fad (patch) | |
tree | c8c8cef065c6c34ffdb51001d1efcfb65999e047 /webkit/appcache/appcache_host.cc | |
parent | 6173a33a7ae279d20227528e5eddf402b5456213 (diff) | |
download | chromium_src-2cd1b419704881832767acda830bd817fcaa5fad.zip chromium_src-2cd1b419704881832767acda830bd817fcaa5fad.tar.gz chromium_src-2cd1b419704881832767acda830bd817fcaa5fad.tar.bz2 |
Fix host status bug:
* Return DOWNLOADING status for cache without owning group.
* Clear out saved notion of status in host on event raised and before swapping cache as those invalidate any saved notion of cache status.
TEST=no new tests; covered by existing appcache layout tests
BUG=none
Review URL: http://codereview.chromium.org/449063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33511 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_host.cc')
-rw-r--r-- | webkit/appcache/appcache_host.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/webkit/appcache/appcache_host.cc b/webkit/appcache/appcache_host.cc index 7fd18fd..6a62a44 100644 --- a/webkit/appcache/appcache_host.cc +++ b/webkit/appcache/appcache_host.cc @@ -208,9 +208,14 @@ AppCacheRequestHandler* AppCacheHost::CreateRequestHandler( Status AppCacheHost::GetStatus() { // 6.9.8 Application cache API AppCache* cache = associated_cache(); - if (!cache || !cache->owning_group()) + if (!cache) return UNCACHED; + // A cache without an owning group represents the cache being constructed + // during the application cache update process. + if (!cache->owning_group()) + return DOWNLOADING; + if (cache->owning_group()->is_obsolete()) return OBSOLETE; if (cache->owning_group()->update_status() == AppCacheGroup::CHECKING) |