summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/appcache_host.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 13:10:21 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 13:10:21 +0000
commit035545f333d5f508bee18782784b17c3d6889924 (patch)
treebc7f79bb0f9aeb52bceca75741f0e1e68cb3228d /webkit/appcache/appcache_host.cc
parentf16943a1cad260cdee0d20147ea947d9bff84d84 (diff)
downloadchromium_src-035545f333d5f508bee18782784b17c3d6889924.zip
chromium_src-035545f333d5f508bee18782784b17c3d6889924.tar.gz
chromium_src-035545f333d5f508bee18782784b17c3d6889924.tar.bz2
Indicate in the tab UI if appcache creation was blocked by privacy settings.
TEST=manual BUG=38362 Review URL: http://codereview.chromium.org/1600002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44079 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_host.cc')
-rw-r--r--webkit/appcache/appcache_host.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/webkit/appcache/appcache_host.cc b/webkit/appcache/appcache_host.cc
index 4fb098f..d4ca661 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),
+ main_resource_blocked_(false) {
}
AppCacheHost::~AppCacheHost() {
@@ -43,6 +44,9 @@ void AppCacheHost::SelectCache(const GURL& document_url,
!pending_swap_cache_callback_ &&
!pending_get_status_callback_);
+ if (main_resource_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::NotifyMainResourceBlocked() {
+ main_resource_blocked_ = true;
+}
+
void AppCacheHost::AssociateCache(AppCache* cache) {
if (associated_cache_.get()) {
associated_cache_->UnassociateHost(this);