| Index: third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp
|
| diff --git a/third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp b/third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp
|
| deleted file mode 100644
|
| index 3920c3aa23f9cc63b39a32a8b3c36f3510c38c6c..0000000000000000000000000000000000000000
|
| --- a/third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp
|
| +++ /dev/null
|
| @@ -1,80 +0,0 @@
|
| -// Copyright 2015 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -#include "modules/background_sync/SyncCallbacks.h"
|
| -
|
| -#include "bindings/core/v8/ScriptPromiseResolver.h"
|
| -#include "modules/background_sync/SyncError.h"
|
| -#include "modules/serviceworkers/ServiceWorkerRegistration.h"
|
| -#include "wtf/PtrUtil.h"
|
| -#include <memory>
|
| -
|
| -namespace blink {
|
| -
|
| -SyncRegistrationCallbacks::SyncRegistrationCallbacks(
|
| - ScriptPromiseResolver* resolver,
|
| - ServiceWorkerRegistration* serviceWorkerRegistration)
|
| - : m_resolver(resolver),
|
| - m_serviceWorkerRegistration(serviceWorkerRegistration) {
|
| - ASSERT(m_resolver);
|
| - ASSERT(m_serviceWorkerRegistration);
|
| -}
|
| -
|
| -SyncRegistrationCallbacks::~SyncRegistrationCallbacks() {}
|
| -
|
| -void SyncRegistrationCallbacks::onSuccess(
|
| - mojom::blink::SyncRegistrationPtr syncRegistration) {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped()) {
|
| - return;
|
| - }
|
| -
|
| - if (!syncRegistration) {
|
| - m_resolver->resolve(v8::Null(m_resolver->getScriptState()->isolate()));
|
| - return;
|
| - }
|
| - m_resolver->resolve();
|
| -}
|
| -
|
| -void SyncRegistrationCallbacks::onError(const WebSyncError& error) {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped()) {
|
| - return;
|
| - }
|
| - m_resolver->reject(SyncError::take(m_resolver.get(), error));
|
| -}
|
| -
|
| -SyncGetRegistrationsCallbacks::SyncGetRegistrationsCallbacks(
|
| - ScriptPromiseResolver* resolver,
|
| - ServiceWorkerRegistration* serviceWorkerRegistration)
|
| - : m_resolver(resolver),
|
| - m_serviceWorkerRegistration(serviceWorkerRegistration) {
|
| - ASSERT(m_resolver);
|
| - ASSERT(m_serviceWorkerRegistration);
|
| -}
|
| -
|
| -SyncGetRegistrationsCallbacks::~SyncGetRegistrationsCallbacks() {}
|
| -
|
| -void SyncGetRegistrationsCallbacks::onSuccess(
|
| - const WebVector<mojom::blink::SyncRegistration*>& syncRegistrations) {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped()) {
|
| - return;
|
| - }
|
| - Vector<String> tags;
|
| - for (const mojom::blink::SyncRegistration* r : syncRegistrations) {
|
| - tags.append(r->tag);
|
| - }
|
| - m_resolver->resolve(tags);
|
| -}
|
| -
|
| -void SyncGetRegistrationsCallbacks::onError(const WebSyncError& error) {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped()) {
|
| - return;
|
| - }
|
| - m_resolver->reject(SyncError::take(m_resolver.get(), error));
|
| -}
|
| -
|
| -} // namespace blink
|
|
|