Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(684)

Unified Diff: content/renderer/background_sync/background_sync_client_impl.cc

Issue 2490623005: Remove InterfaceRegistry/Provider from service workers (Closed)
Patch Set: review Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/background_sync/background_sync_client_impl.cc
diff --git a/content/renderer/background_sync/background_sync_client_impl.cc b/content/renderer/background_sync/background_sync_client_impl.cc
deleted file mode 100644
index 6306fdb78a41cbd5bc003763495aba653cd1a3a3..0000000000000000000000000000000000000000
--- a/content/renderer/background_sync/background_sync_client_impl.cc
+++ /dev/null
@@ -1,54 +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 "content/renderer/background_sync/background_sync_client_impl.h"
-
-#include <utility>
-
-#include "base/time/time.h"
-#include "content/child/background_sync/background_sync_provider.h"
-#include "content/child/background_sync/background_sync_type_converters.h"
-#include "content/renderer/service_worker/service_worker_context_client.h"
-#include "mojo/public/cpp/bindings/strong_binding.h"
-#include "third_party/WebKit/public/platform/Platform.h"
-#include "third_party/WebKit/public/platform/WebThread.h"
-#include "third_party/WebKit/public/platform/modules/background_sync/WebSyncProvider.h"
-#include "third_party/WebKit/public/platform/modules/background_sync/WebSyncRegistration.h"
-#include "third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h"
-
-namespace content {
-
-// static
-void BackgroundSyncClientImpl::Create(
- mojo::InterfaceRequest<blink::mojom::BackgroundSyncServiceClient> request) {
- mojo::MakeStrongBinding(base::WrapUnique(new BackgroundSyncClientImpl),
- std::move(request));
-}
-
-BackgroundSyncClientImpl::~BackgroundSyncClientImpl() {}
-
-BackgroundSyncClientImpl::BackgroundSyncClientImpl() {}
-
-void BackgroundSyncClientImpl::Sync(
- const mojo::String& tag,
- blink::mojom::BackgroundSyncEventLastChance last_chance,
- const SyncCallback& callback) {
- DCHECK(!blink::Platform::current()->mainThread()->isCurrentThread());
-
- ServiceWorkerContextClient* client =
- ServiceWorkerContextClient::ThreadSpecificInstance();
- if (!client) {
- callback.Run(blink::mojom::ServiceWorkerEventStatus::ABORTED,
- base::Time::Now());
- return;
- }
-
- blink::WebServiceWorkerContextProxy::LastChanceOption web_last_chance =
- mojo::ConvertTo<blink::WebServiceWorkerContextProxy::LastChanceOption>(
- last_chance);
-
- client->DispatchSyncEvent(tag, web_last_chance, callback);
-}
-
-} // namespace content

Powered by Google App Engine
This is Rietveld 408576698