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

Unified Diff: blimp/engine/mojo/blob_channel_service.cc

Issue 2189503004: BlobChannelService is modified to be Mojo Service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments. Created 4 years, 5 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: blimp/engine/mojo/blob_channel_service.cc
diff --git a/blimp/engine/mojo/blob_channel_service.cc b/blimp/engine/mojo/blob_channel_service.cc
index d51c9249b7afe8046b5de7d6faeeef98222a35d5..f26e743030ee068447066331a7b91bd32989b013 100644
--- a/blimp/engine/mojo/blob_channel_service.cc
+++ b/blimp/engine/mojo/blob_channel_service.cc
@@ -16,10 +16,8 @@
namespace blimp {
namespace engine {
-BlobChannelService::BlobChannelService(BlobChannelSender* blob_channel_sender,
- mojom::BlobChannelRequest request)
- : binding_(this, std::move(request)),
- blob_channel_sender_(blob_channel_sender) {
+BlobChannelService::BlobChannelService(BlobChannelSender* blob_channel_sender)
+ : blob_channel_sender_(blob_channel_sender) {
DCHECK(blob_channel_sender_);
}
@@ -61,13 +59,11 @@ void BlobChannelService::DeliverBlob(const std::string& id) {
blob_channel_sender_->DeliverBlob(id);
}
-// static
-void BlobChannelService::Create(
- BlobChannelSender* blob_channel_sender,
+void BlobChannelService::BindRequest(
mojo::InterfaceRequest<mojom::BlobChannel> request) {
- // Object lifetime is managed by BlobChannelService's StrongBinding
- // |binding_|.
- new BlobChannelService(blob_channel_sender, std::move(request));
+ // Object lifetime is managed by BlobChannelService's BindingSet
Kevin M 2016/07/28 18:14:47 This isn't the case anymore?
CJ 2016/07/28 19:54:15 Done.
+ // |bindings_|.
+ bindings_.AddBinding(this, std::move(request));
}
} // namespace engine

Powered by Google App Engine
This is Rietveld 408576698