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

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

Issue 2326913003: Privatize StrongBinding lifetime management (Closed)
Patch Set: rebase Created 4 years, 3 months 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
index f4b7d9372a0b8801d33c68ab9d8abbfcb7f52909..e00c704ebb523ab3885b204124207da983f941a1 100644
--- a/content/renderer/background_sync/background_sync_client_impl.cc
+++ b/content/renderer/background_sync/background_sync_client_impl.cc
@@ -10,6 +10,7 @@
#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"
@@ -21,14 +22,13 @@ namespace content {
// static
void BackgroundSyncClientImpl::Create(
mojo::InterfaceRequest<blink::mojom::BackgroundSyncServiceClient> request) {
- new BackgroundSyncClientImpl(std::move(request));
+ mojo::MakeStrongBinding(base::WrapUnique(new BackgroundSyncClientImpl),
+ std::move(request));
}
BackgroundSyncClientImpl::~BackgroundSyncClientImpl() {}
-BackgroundSyncClientImpl::BackgroundSyncClientImpl(
- mojo::InterfaceRequest<blink::mojom::BackgroundSyncServiceClient> request)
- : binding_(this, std::move(request)) {}
+BackgroundSyncClientImpl::BackgroundSyncClientImpl() {}
void BackgroundSyncClientImpl::Sync(
const mojo::String& tag,

Powered by Google App Engine
This is Rietveld 408576698