Index: services/media/factory_service/media_sink_impl.cc |
diff --git a/services/media/factory_service/media_sink_impl.cc b/services/media/factory_service/media_sink_impl.cc |
index 36aa156cc9d9ab8544047df3cfdb87c3292436d4..da4b7efd4d4fb523cc2eb2b301f276ef474f0cc8 100644 |
--- a/services/media/factory_service/media_sink_impl.cc |
+++ b/services/media/factory_service/media_sink_impl.cc |
@@ -26,16 +26,12 @@ MediaSinkImpl::MediaSinkImpl(const String& destination_url, |
MediaTypePtr media_type, |
InterfaceRequest<MediaSink> request, |
MediaFactoryService* owner) |
- : MediaFactoryService::Product(owner), |
- binding_(this, request.Pass()), |
+ : MediaFactoryService::Product<MediaSink>(this, request.Pass(), owner), |
consumer_(MojoConsumer::Create()), |
producer_(MojoProducer::Create()) { |
DCHECK(destination_url); |
DCHECK(media_type); |
- // Go away when the client is no longer connected. |
- binding_.set_connection_error_handler([this]() { ReleaseFromOwner(); }); |
- |
status_publisher_.SetCallbackRunner( |
[this](const GetStatusCallback& callback, uint64_t version) { |
MediaSinkStatusPtr status = MediaSinkStatus::New(); |
@@ -83,13 +79,7 @@ MediaSinkImpl::MediaSinkImpl(const String& destination_url, |
return; |
} |
- if (destination_url != "mojo:audio_server") { |
- LOG(ERROR) << "mojo:audio_server is the only supported destination"; |
- if (binding_.is_bound()) { |
- binding_.Close(); |
- } |
- return; |
- } |
+ RCHECK(destination_url == "mojo:audio_server"); |
// TODO(dalesat): Once we have c++14, get rid of this shared pointer hack. |
std::shared_ptr<StreamType> captured_stream_type( |