Index: content/browser/appcache/appcache_host.cc |
diff --git a/content/browser/appcache/appcache_host.cc b/content/browser/appcache/appcache_host.cc |
index 13dfe9647a05af3579b9564378baaa41ca1d3bf6..52213a3a14e0b0f596a75d554708a71691079f99 100644 |
--- a/content/browser/appcache/appcache_host.cc |
+++ b/content/browser/appcache/appcache_host.cc |
@@ -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_); |