Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / content / browser / appcache / appcache_host.cc
index 13dfe96..52213a3 100644 (file)
@@ -49,6 +49,7 @@ AppCacheHost::AppCacheHost(int host_id, AppCacheFrontend* frontend,
       parent_host_id_(kAppCacheNoHostId), parent_process_id_(0),
       pending_main_resource_cache_id_(kAppCacheNoCacheId),
       pending_selected_cache_id_(kAppCacheNoCacheId),
+      is_cache_selection_enabled_(true),
       frontend_(frontend), service_(service),
       storage_(service->storage()),
       pending_callback_param_(NULL),
@@ -86,6 +87,11 @@ void AppCacheHost::SelectCache(const GURL& document_url,
          pending_get_status_callback_.is_null() &&
          !is_selection_pending());
 
+  if (!is_cache_selection_enabled_) {
+    FinishCacheSelection(NULL, NULL);
+    return;
+  }
+
   origin_in_use_ = document_url.GetOrigin();
   if (service()->quota_manager_proxy() && !origin_in_use_.is_empty())
     service()->quota_manager_proxy()->NotifyOriginInUse(origin_in_use_);