| Index: Source/modules/background_sync/ServiceWorkerRegistrationSync.cpp
|
| diff --git a/Source/modules/background_sync/ServiceWorkerRegistrationSync.cpp b/Source/modules/background_sync/ServiceWorkerRegistrationSync.cpp
|
| index e169b8a640d7983508f69b627753f7cce9bdcf27..67516eee0e58732b086e04b55127a06cf6797965 100644
|
| --- a/Source/modules/background_sync/ServiceWorkerRegistrationSync.cpp
|
| +++ b/Source/modules/background_sync/ServiceWorkerRegistrationSync.cpp
|
| @@ -5,6 +5,7 @@
|
| #include "config.h"
|
| #include "modules/background_sync/ServiceWorkerRegistrationSync.h"
|
|
|
| +#include "modules/background_sync/PeriodicSyncManager.h"
|
| #include "modules/background_sync/SyncManager.h"
|
| #include "modules/serviceworkers/ServiceWorkerRegistration.h"
|
|
|
| @@ -34,22 +35,35 @@ ServiceWorkerRegistrationSync& ServiceWorkerRegistrationSync::from(ServiceWorker
|
| return *supplement;
|
| }
|
|
|
| -SyncManager* ServiceWorkerRegistrationSync::syncManager(ServiceWorkerRegistration& registration)
|
| +SyncManager* ServiceWorkerRegistrationSync::sync(ServiceWorkerRegistration& registration)
|
| {
|
| - return ServiceWorkerRegistrationSync::from(registration).syncManager();
|
| + return ServiceWorkerRegistrationSync::from(registration).sync();
|
| }
|
|
|
| -SyncManager* ServiceWorkerRegistrationSync::syncManager()
|
| +SyncManager* ServiceWorkerRegistrationSync::sync()
|
| {
|
| if (!m_syncManager)
|
| m_syncManager = SyncManager::create(m_registration);
|
| return m_syncManager.get();
|
| }
|
|
|
| +PeriodicSyncManager* ServiceWorkerRegistrationSync::periodicSync(ServiceWorkerRegistration& registration)
|
| +{
|
| + return ServiceWorkerRegistrationSync::from(registration).periodicSync();
|
| +}
|
| +
|
| +PeriodicSyncManager* ServiceWorkerRegistrationSync::periodicSync()
|
| +{
|
| + if (!m_periodicSyncManager)
|
| + m_periodicSyncManager = PeriodicSyncManager::create(m_registration);
|
| + return m_periodicSyncManager.get();
|
| +}
|
| +
|
| DEFINE_TRACE(ServiceWorkerRegistrationSync)
|
| {
|
| visitor->trace(m_registration);
|
| visitor->trace(m_syncManager);
|
| + visitor->trace(m_periodicSyncManager);
|
| HeapSupplement<ServiceWorkerRegistration>::trace(visitor);
|
| }
|
|
|
|
|