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

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

Issue 2490623005: Remove InterfaceRegistry/Provider from service workers (Closed)
Patch Set: rebase/fix comment 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 254e5c223298ac7376579fbceac694929bfdb75a..0000000000000000000000000000000000000000
--- a/content/renderer/background_sync/background_sync_client_impl.cc
+++ /dev/null
@@ -1,51 +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_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/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 std::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
« no previous file with comments | « content/renderer/background_sync/background_sync_client_impl.h ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698