summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/appcache_host.cc
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-16 18:39:39 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-16 18:39:39 +0000
commit9830d77aa9cc9efd03d64226b15cfd94c39e66f8 (patch)
tree939166dbdc360b3c7d596cc2cef95803df82ac59 /webkit/appcache/appcache_host.cc
parent59e414ef3fbd4551cc17a7cece753946357b8f63 (diff)
downloadchromium_src-9830d77aa9cc9efd03d64226b15cfd94c39e66f8.zip
chromium_src-9830d77aa9cc9efd03d64226b15cfd94c39e66f8.tar.gz
chromium_src-9830d77aa9cc9efd03d64226b15cfd94c39e66f8.tar.bz2
Enough appcache + quota integration to call NotifyOriginInUse/NotifyOriginNoLongerInUse when frames are loaded/unloaded.
BUG=61676 TEST=appcache_host_unittest.cc Review URL: http://codereview.chromium.org/6999008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85507 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_host.cc')
-rw-r--r--webkit/appcache/appcache_host.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/webkit/appcache/appcache_host.cc b/webkit/appcache/appcache_host.cc
index 18809790..6965c1d 100644
--- a/webkit/appcache/appcache_host.cc
+++ b/webkit/appcache/appcache_host.cc
@@ -10,6 +10,7 @@
#include "webkit/appcache/appcache.h"
#include "webkit/appcache/appcache_backend_impl.h"
#include "webkit/appcache/appcache_request_handler.h"
+#include "webkit/quota/quota_manager.h"
namespace appcache {
@@ -52,6 +53,8 @@ AppCacheHost::~AppCacheHost() {
if (group_being_updated_.get())
group_being_updated_->RemoveUpdateObserver(this);
service_->storage()->CancelDelegateCallbacks(this);
+ if (service()->quota_manager_proxy() && !origin_in_use_.is_empty())
+ service()->quota_manager_proxy()->NotifyOriginNoLongerInUse(origin_in_use_);
}
void AppCacheHost::AddObserver(Observer* observer) {
@@ -70,6 +73,10 @@ void AppCacheHost::SelectCache(const GURL& document_url,
!pending_get_status_callback_ &&
!is_selection_pending());
+ origin_in_use_ = document_url.GetOrigin();
+ if (service()->quota_manager_proxy() && !origin_in_use_.is_empty())
+ service()->quota_manager_proxy()->NotifyOriginInUse(origin_in_use_);
+
if (main_resource_blocked_)
frontend_->OnContentBlocked(host_id_,
blocked_manifest_url_);