Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / webkit / browser / appcache / appcache_host.cc
index a8a86f8..b4b4222 100644 (file)
@@ -116,7 +116,12 @@ void AppCacheHost::SelectCache(const GURL& document_url,
       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;
     }
@@ -489,6 +494,20 @@ void AppCacheHost::NotifyMainResourceBlocked(const GURL& manifest_url) {
   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);