Index: webkit/appcache/appcache_request_handler.cc |
diff --git a/webkit/appcache/appcache_request_handler.cc b/webkit/appcache/appcache_request_handler.cc |
index a90d6d7c0ea96d9c8b659d935c19df5c1e75f93d..2ccc1346efc68cdd90255e79fd3a9cd233ad78b9 100644 |
--- a/webkit/appcache/appcache_request_handler.cc |
+++ b/webkit/appcache/appcache_request_handler.cc |
@@ -7,6 +7,7 @@ |
#include "net/url_request/url_request.h" |
#include "net/url_request/url_request_job.h" |
#include "webkit/appcache/appcache.h" |
+#include "webkit/appcache/appcache_policy.h" |
#include "webkit/appcache/appcache_url_request_job.h" |
namespace appcache { |
@@ -216,14 +217,17 @@ void AppCacheRequestHandler::MaybeLoadMainResource(net::URLRequest* request) { |
void AppCacheRequestHandler::OnMainResponseFound( |
const GURL& url, const AppCacheEntry& entry, |
const GURL& fallback_url, const AppCacheEntry& fallback_entry, |
- int64 cache_id, const GURL& manifest_url, |
- bool was_blocked_by_policy) { |
+ int64 cache_id, const GURL& manifest_url) { |
DCHECK(host_); |
DCHECK(is_main_resource()); |
DCHECK(!entry.IsForeign()); |
DCHECK(!fallback_entry.IsForeign()); |
DCHECK(!(entry.has_response_id() && fallback_entry.has_response_id())); |
+ AppCachePolicy* policy = host_->service()->appcache_policy(); |
+ bool was_blocked_by_policy = policy && |
+ !policy->CanLoadAppCache(manifest_url, host_->first_party_url()); |
michaeln
2011/09/02 18:47:47
in most cases (the "nothing was found" case), mani
marja
2011/09/05 10:42:24
Ok, in the current code in AppCacheStorageImpl::Ch
|
+ |
if (ResourceType::IsFrame(resource_type_)) { |
if (was_blocked_by_policy) |
host_->NotifyMainResourceBlocked(manifest_url); |