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

Unified Diff: content/browser/service_worker/service_worker_provider_host.cc

Issue 558873003: Better coordinate what's responsible for associating a registration to a document. During navigatio… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/service_worker/service_worker_provider_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_provider_host.cc
diff --git a/content/browser/service_worker/service_worker_provider_host.cc b/content/browser/service_worker/service_worker_provider_host.cc
index 7d887c5a3458e70397968142ef2b2d93a6e246d2..20b9b5e66eb579bbb1e19aeaee3e77a13c13003a 100644
--- a/content/browser/service_worker/service_worker_provider_host.cc
+++ b/content/browser/service_worker/service_worker_provider_host.cc
@@ -28,7 +28,8 @@ ServiceWorkerProviderHost::ServiceWorkerProviderHost(
: process_id_(process_id),
provider_id_(provider_id),
context_(context),
- dispatcher_host_(dispatcher_host) {
+ dispatcher_host_(dispatcher_host),
+ allow_association_(true) {
}
ServiceWorkerProviderHost::~ServiceWorkerProviderHost() {
@@ -183,7 +184,7 @@ bool ServiceWorkerProviderHost::CanAssociateRegistration(
return false;
if (running_hosted_version_.get())
return false;
- if (!registration || associated_registration_.get())
+ if (!registration || associated_registration_.get() || !allow_association_)
return false;
return true;
}
« no previous file with comments | « content/browser/service_worker/service_worker_provider_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698