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

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

Issue 477593007: ServiceWorker: Make '.ready' return a promise to be resolved with ServiceWorkerRegistration (2/3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remake more 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
Index: content/browser/service_worker/service_worker_controllee_request_handler.cc
diff --git a/content/browser/service_worker/service_worker_controllee_request_handler.cc b/content/browser/service_worker/service_worker_controllee_request_handler.cc
index 0db1289002c8db8b2ab01d41aa5a8888cbb0da06..f19a52c6736ba9cf4901a9aa6f0c14c47e338551 100644
--- a/content/browser/service_worker/service_worker_controllee_request_handler.cc
+++ b/content/browser/service_worker/service_worker_controllee_request_handler.cc
@@ -139,6 +139,7 @@ ServiceWorkerControlleeRequestHandler::DidLookupRegistrationForMainResource(
return;
}
DCHECK(registration.get());
+ provider_host_->AssociateRegistration(registration.get());
nhiroki 2014/09/08 15:55:52 To associate a potential controllee (ie. |provider
michaeln 2014/09/09 02:22:01 Does this have to happen prior to the pre-existing
nhiroki 2014/09/09 08:49:08 Hmmm... I think the condition would have already e
nhiroki 2014/09/09 11:48:35 As per the spec discussion (https://github.com/sli
michaeln 2014/09/09 23:30:33 Ah, I think your right and it definitely will have
ServiceWorkerMetrics::CountControlledPageLoad();
@@ -182,7 +183,7 @@ ServiceWorkerControlleeRequestHandler::DidLookupRegistrationForMainResource(
return;
}
- provider_host_->AssociateRegistration(registration.get());
+ provider_host_->SetControllerVersionAttribute(active_version.get());
job_->ForwardToServiceWorker();
TRACE_EVENT_ASYNC_END2(
"ServiceWorker",
@@ -202,7 +203,7 @@ void ServiceWorkerControlleeRequestHandler::OnVersionStatusChanged(
return;
}
- provider_host_->AssociateRegistration(registration);
+ provider_host_->SetControllerVersionAttribute(registration->active_version());
job_->ForwardToServiceWorker();
}

Powered by Google App Engine
This is Rietveld 408576698