diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 23:40:02 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 23:40:02 +0000 |
commit | d68a4fc6f448c6ebf407e2817320e7736c4735ee (patch) | |
tree | d76e2c91aa67af5a880ec81eddcbf2d12887e865 /webkit/appcache/appcache_host.cc | |
parent | 63eb6c0bebc31046bbd954ef21dee86dca9d7fe3 (diff) | |
download | chromium_src-d68a4fc6f448c6ebf407e2817320e7736c4735ee.zip chromium_src-d68a4fc6f448c6ebf407e2817320e7736c4735ee.tar.gz chromium_src-d68a4fc6f448c6ebf407e2817320e7736c4735ee.tar.bz2 |
Hook up the content settings UI to the appcache.
* Populate the tree view with appcaches
* Delete selected appcaches from the tree view
* Delete the date range indicated in the browsing data remover
TEST=manual
BUG=34634
Review URL: http://codereview.chromium.org/660423
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40796 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_host.cc')
-rw-r--r-- | webkit/appcache/appcache_host.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/webkit/appcache/appcache_host.cc b/webkit/appcache/appcache_host.cc index 9d1bf9c..4fb098f 100644 --- a/webkit/appcache/appcache_host.cc +++ b/webkit/appcache/appcache_host.cc @@ -142,7 +142,7 @@ void AppCacheHost::DoPendingStartUpdate() { bool success = false; if (associated_cache_ && associated_cache_->owning_group()) { AppCacheGroup* group = associated_cache_->owning_group(); - if (!group->is_obsolete()) { + if (!group->is_obsolete() && !group->is_being_deleted()) { success = true; group->StartUpdate(); } @@ -235,7 +235,7 @@ void AppCacheHost::LoadOrCreateGroup(const GURL& manifest_url) { } void AppCacheHost::OnGroupLoaded(AppCacheGroup* group, - const GURL& manifest_url) { + const GURL& manifest_url) { DCHECK(manifest_url == pending_selected_manifest_url_); pending_selected_manifest_url_ = GURL(); FinishCacheSelection(NULL, group); @@ -270,11 +270,12 @@ void AppCacheHost::FinishCacheSelection( DCHECK(cache->owning_group()); DCHECK(new_master_entry_url_.is_empty()); AssociateCache(cache); - if (!cache->owning_group()->is_obsolete()) { - cache->owning_group()->StartUpdateWithHost(this); - ObserveGroupBeingUpdated(cache->owning_group()); + AppCacheGroup* owing_group = cache->owning_group(); + if (!owing_group->is_obsolete() && !owing_group->is_being_deleted()) { + owing_group->StartUpdateWithHost(this); + ObserveGroupBeingUpdated(owing_group); } - } else if (group) { + } else if (group && !group->is_being_deleted()) { // If document was loaded using HTTP GET or equivalent, and, there is a // manifest URL, and manifest URL has the same origin as document. // Invoke the application cache update process for manifest URL, with @@ -287,6 +288,7 @@ void AppCacheHost::FinishCacheSelection( ObserveGroupBeingUpdated(group); } else { // Otherwise, the Document is not associated with any application cache. + new_master_entry_url_ = GURL(); AssociateCache(NULL); } |