Chromium Code Reviews| Index: chrome/browser/ui/ash/cast_config_delegate_media_router.cc |
| diff --git a/chrome/browser/ui/ash/cast_config_delegate_media_router.cc b/chrome/browser/ui/ash/cast_config_delegate_media_router.cc |
| index 304b27d446f0353c9beff87cd830bfef94cca5bf..1e596e5c081c147469eab9632db094dd12837d4d 100644 |
| --- a/chrome/browser/ui/ash/cast_config_delegate_media_router.cc |
| +++ b/chrome/browser/ui/ash/cast_config_delegate_media_router.cc |
| @@ -95,7 +95,17 @@ void CastDeviceCache::Init() { |
| } |
| void CastDeviceCache::OnSinksReceived(const MediaSinks& sinks) { |
| - sinks_ = sinks; |
| + // The media router adds a MediaSink instance that doesn't have a name. Make |
| + // sure to filter that sink out from the UI so it is not rendered, as it will |
| + // be a line that only has a icon with no apparent meaning. |
| + sinks_.clear(); |
| + for (const media_router::MediaSink& sink : sinks) { |
| + if (sink.name().empty()) |
|
amp
2016/06/02 16:49:24
Until we can duplicate the logic in https://cs.chr
jdufault
2016/06/02 17:35:14
Done.
|
| + continue; |
| + |
| + sinks_.push_back(sink); |
| + } |
| + |
| cast_config_delegate_->RequestDeviceRefresh(); |
| } |