Support updating a service worker registration's updateViaCache flag
[WebKit-https.git] / Source / WebCore / workers / service / server / SWServerRegistration.cpp
index fa16aff..0f3f8b8 100644 (file)
@@ -102,6 +102,14 @@ void SWServerRegistration::updateWorkerState(SWServerWorker& worker, ServiceWork
     });
 }
 
+void SWServerRegistration::setUpdateViaCache(ServiceWorkerUpdateViaCache updateViaCache)
+{
+    m_updateViaCache = updateViaCache;
+    forEachConnection([&](auto& connection) {
+        connection.setRegistrationUpdateViaCache(identifier(), updateViaCache);
+    });
+}
+
 void SWServerRegistration::setLastUpdateTime(WallTime time)
 {
     m_lastUpdateTime = time;