Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Unified Diff: content/browser/appcache/appcache_host.cc

Issue 625433002: Pages controlled by ServiceWorkers should not participate in AppCaching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/appcache/appcache_host.h ('k') | content/browser/appcache/appcache_interceptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_);
« no previous file with comments | « content/browser/appcache/appcache_host.h ('k') | content/browser/appcache/appcache_interceptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698