std::vector<int> host_ids(1, host_id_);
frontend_->OnEventRaised(host_ids, CHECKING_EVENT);
frontend_->OnErrorEventRaised(
- host_ids, "Cache creation was blocked by the content policy");
+ host_ids,
+ ErrorDetails("Cache creation was blocked by the content policy",
+ POLICY_ERROR,
+ GURL(),
+ 0,
+ false /*is_cross_origin*/));
frontend_->OnContentBlocked(host_id_, manifest_url);
return;
}
blocked_manifest_url_ = manifest_url;
}
+void AppCacheHost::PrepareForTransfer() {
+ // This can only happen prior to the document having been loaded.
+ DCHECK(!associated_cache());
+ DCHECK(!is_selection_pending());
+ DCHECK(!group_being_updated_);
+ host_id_ = kNoHostId;
+ frontend_ = NULL;
+}
+
+void AppCacheHost::CompleteTransfer(int host_id, AppCacheFrontend* frontend) {
+ host_id_ = host_id;
+ frontend_ = frontend;
+}
+
void AppCacheHost::AssociateNoCache(const GURL& manifest_url) {
// manifest url can be empty.
AssociateCacheHelper(NULL, manifest_url);