Lines Matching defs:registration
44 ServiceWorkerRegistration* registration)
47 pattern_(registration->pattern()),
48 script_url_(registration->GetNewestVersion()->script_url()),
53 internal_.registration = registration;
89 scoped_refptr<ServiceWorkerRegistration> registration =
91 if (registration.get())
92 RunSoon(base::Bind(next_step, SERVICE_WORKER_OK, registration));
122 const scoped_refptr<ServiceWorkerRegistration>& registration) {
124 DCHECK(!internal_.registration.get());
125 internal_.registration = registration;
128 ServiceWorkerRegistration* ServiceWorkerRegisterJob::registration() {
130 return internal_.registration.get();
146 const scoped_refptr<ServiceWorkerRegistration>& registration) {
148 internal_.uninstalling_registration = registration;
190 // "Let registration be the result of running the [[GetRegistration]] algorithm.
207 // "If scriptURL is equal to registration.[[ScriptURL]], then:"
209 // "Set registration.[[Uninstalling]] to false."
225 // "Set registration.[[Uninstalling]] to false."
229 // passing registration as the argument."
243 if (existing_registration.get() != registration()) {
249 // registration.
250 if (registration()->is_uninstalling() ||
251 registration()->GetNewestVersion()->script_url() != script_url_) {
268 // Abort this registration job.
275 AssociateProviderHostsToRegistration(registration());
312 context_->storage()->NotifyInstallingRegistration(registration());
321 set_new_version(new ServiceWorkerVersion(registration(),
370 // "2. Set registration.installingWorker to worker."
371 registration()->SetInstallingVersion(new_version());
373 // "3. Resolve promise with registration."
374 ResolvePromise(SERVICE_WORKER_OK, registration(), new_version());
376 // "4. Run the [[UpdateState]] algorithm passing registration.installingWorker
381 registration()->NotifyUpdateFound();
401 registration()->set_last_update_check(base::Time::Now());
403 registration(),
416 // "9. If registration.waitingWorker is not null, then:..."
417 if (registration()->waiting_version()) {
418 // "1. Run the [[UpdateState]] algorithm passing registration.waitingWorker
420 registration()->waiting_version()->SetStatus(
424 // "10. Set registration.waitingWorker to registration.installingWorker."
425 // "11. Set registration.installingWorker to null."
426 registration()->SetWaitingVersion(new_version());
428 // "12. Run the [[UpdateState]] algorithm passing registration.waitingWorker
434 // "14. Wait until no document is using registration as their
435 // Service Worker registration."
436 registration()->ActivateWaitingVersionWhenReady();
450 if (registration()) {
452 registration()->UnsetVersion(new_version());
455 if (!registration()->waiting_version() &&
456 !registration()->active_version()) {
457 registration()->NotifyRegistrationFailed();
459 registration()->id(),
460 registration()->pattern().GetOrigin(),
468 if (registration()) {
470 registration(), new_version(), status);
478 ServiceWorkerRegistration* registration,
483 promise_resolved_registration_ = registration;
488 it->Run(status, registration, version);
496 registration()->waiting_version() ?
497 registration()->waiting_version() :
498 registration()->active_version();
535 base::Time::Now() - registration()->last_update_check();
537 registration()->set_last_update_check(base::Time::Now());
538 context_->storage()->UpdateLastUpdateCheckTime(registration());
541 ResolvePromise(SERVICE_WORKER_OK, registration(), most_recent_version);
552 ServiceWorkerRegistration* registration) {
553 DCHECK(registration);
558 if (ServiceWorkerUtils::ScopeMatches(registration->pattern(),
560 if (host->CanAssociateRegistration(registration))
561 host->AssociateRegistration(registration);