forked from mirrors/gecko-dev
Bug 1482921 - The ServiceWorkerManager should no longer use these types. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D3220 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
0930c2bbe1
commit
ca85669dab
2 changed files with 0 additions and 56 deletions
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIConsoleService.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIEffectiveTLDService.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsIStreamLoader.h"
|
||||
|
|
@ -22,7 +21,6 @@
|
|||
#include "nsISimpleEnumerator.h"
|
||||
#include "nsITimer.h"
|
||||
#include "nsIUploadChannel2.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
|
|
@ -1234,26 +1232,6 @@ ServiceWorkerManager::GetActiveWorkerInfoForScope(const OriginAttributes& aOrigi
|
|||
return registration->GetActive();
|
||||
}
|
||||
|
||||
ServiceWorkerInfo*
|
||||
ServiceWorkerManager::GetActiveWorkerInfoForDocument(nsIDocument* aDocument)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
Maybe<ClientInfo> clientInfo(aDocument->GetClientInfo());
|
||||
if (clientInfo.isNothing()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<ServiceWorkerRegistrationInfo> registration;
|
||||
GetClientRegistration(clientInfo.ref(), getter_AddRefs(registration));
|
||||
|
||||
if (!registration) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return registration->GetActive();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
class UnregisterJobCallback final : public ServiceWorkerJob::Callback
|
||||
|
|
@ -1630,31 +1608,6 @@ ServiceWorkerManager::StoreRegistration(
|
|||
mActor->SendRegister(data);
|
||||
}
|
||||
|
||||
already_AddRefed<ServiceWorkerRegistrationInfo>
|
||||
ServiceWorkerManager::GetServiceWorkerRegistrationInfo(nsPIDOMWindowInner* aWindow) const
|
||||
{
|
||||
MOZ_ASSERT(aWindow);
|
||||
nsCOMPtr<nsIDocument> document = aWindow->GetExtantDoc();
|
||||
return GetServiceWorkerRegistrationInfo(document);
|
||||
}
|
||||
|
||||
already_AddRefed<ServiceWorkerRegistrationInfo>
|
||||
ServiceWorkerManager::GetServiceWorkerRegistrationInfo(nsIDocument* aDoc) const
|
||||
{
|
||||
MOZ_ASSERT(aDoc);
|
||||
nsCOMPtr<nsIURI> documentURI = aDoc->GetDocumentURI();
|
||||
nsCOMPtr<nsIPrincipal> principal = aDoc->NodePrincipal();
|
||||
RefPtr<ServiceWorkerRegistrationInfo> reg =
|
||||
GetServiceWorkerRegistrationInfo(principal, documentURI);
|
||||
if (reg) {
|
||||
auto storageAllowed = nsContentUtils::StorageAllowedForDocument(aDoc);
|
||||
if (storageAllowed != nsContentUtils::StorageAccess::eAllow) {
|
||||
reg = nullptr;
|
||||
}
|
||||
}
|
||||
return reg.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<ServiceWorkerRegistrationInfo>
|
||||
ServiceWorkerManager::GetServiceWorkerRegistrationInfo(const ClientInfo& aClientInfo) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -378,18 +378,9 @@ private:
|
|||
GetActiveWorkerInfoForScope(const OriginAttributes& aOriginAttributes,
|
||||
const nsACString& aScope);
|
||||
|
||||
ServiceWorkerInfo*
|
||||
GetActiveWorkerInfoForDocument(nsIDocument* aDocument);
|
||||
|
||||
void
|
||||
StopControllingRegistration(ServiceWorkerRegistrationInfo* aRegistration);
|
||||
|
||||
already_AddRefed<ServiceWorkerRegistrationInfo>
|
||||
GetServiceWorkerRegistrationInfo(nsPIDOMWindowInner* aWindow) const;
|
||||
|
||||
already_AddRefed<ServiceWorkerRegistrationInfo>
|
||||
GetServiceWorkerRegistrationInfo(nsIDocument* aDoc) const;
|
||||
|
||||
already_AddRefed<ServiceWorkerRegistrationInfo>
|
||||
GetServiceWorkerRegistrationInfo(const ClientInfo& aClientInfo) const;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue