| Index: webkit/appcache/appcache_host.cc
|
| diff --git a/webkit/appcache/appcache_host.cc b/webkit/appcache/appcache_host.cc
|
| index 4fb098f259be5c91d8fda7ff971886f1c17f5aa8..13aa29e13a5319910b8560ed67bd070ff8df4408 100644
|
| --- a/webkit/appcache/appcache_host.cc
|
| +++ b/webkit/appcache/appcache_host.cc
|
| @@ -16,7 +16,8 @@ AppCacheHost::AppCacheHost(int host_id, AppCacheFrontend* frontend,
|
| pending_selected_cache_id_(kNoCacheId),
|
| frontend_(frontend), service_(service),
|
| pending_get_status_callback_(NULL), pending_start_update_callback_(NULL),
|
| - pending_swap_cache_callback_(NULL), pending_callback_param_(NULL) {
|
| + pending_swap_cache_callback_(NULL), pending_callback_param_(NULL),
|
| + content_blocked_(false) {
|
| }
|
|
|
| AppCacheHost::~AppCacheHost() {
|
| @@ -43,6 +44,9 @@ void AppCacheHost::SelectCache(const GURL& document_url,
|
| !pending_swap_cache_callback_ &&
|
| !pending_get_status_callback_);
|
|
|
| + if (content_blocked_)
|
| + frontend_->OnContentBlocked(host_id_);
|
| +
|
| // First we handle an unusual case of SelectCache being called a second
|
| // time. Generally this shouldn't happen, but with bad content I think
|
| // this can occur... <html manifest=foo> <html manifest=bar></html></html>
|
| @@ -321,6 +325,10 @@ void AppCacheHost::OnUpdateComplete(AppCacheGroup* group) {
|
| newest_cache_of_group_being_updated_ = NULL;
|
| }
|
|
|
| +void AppCacheHost::OnContentBlocked(AppCacheGroup* group) {
|
| + frontend_->OnContentBlocked(host_id_);
|
| +}
|
| +
|
| void AppCacheHost::SetSwappableCache(AppCacheGroup* group) {
|
| if (!group) {
|
| swappable_cache_ = NULL;
|
| @@ -343,6 +351,10 @@ void AppCacheHost::LoadMainResourceCache(int64 cache_id) {
|
| service_->storage()->LoadCache(cache_id, this);
|
| }
|
|
|
| +void AppCacheHost::NotifyContentBlocked() {
|
| + content_blocked_ = true;
|
| +}
|
| +
|
| void AppCacheHost::AssociateCache(AppCache* cache) {
|
| if (associated_cache_.get()) {
|
| associated_cache_->UnassociateHost(this);
|
|
|