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

Unified Diff: chrome/browser/media/router/mojo/media_router_mojo_impl.cc

Issue 2675033002: [Media Router] Add MediaSink subtypes (Closed)
Patch Set: use base::Optional instead of union to store extra data Created 3 years, 10 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: chrome/browser/media/router/mojo/media_router_mojo_impl.cc
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
index 82bf5d61afcd190d2b1eff7d8f50206112bf1dd8..5236f70eaa38ae938e6414bcb3785aab921674c5 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
+++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
@@ -174,7 +174,7 @@ void MediaRouterMojoImpl::OnIssue(const IssueInfo& issue) {
void MediaRouterMojoImpl::OnSinksReceived(
const std::string& media_source,
- const std::vector<MediaSink>& sinks,
+ const std::vector<MediaSinkInternal>& internal_sinks,
const std::vector<url::Origin>& origins) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DVLOG_WITH_INSTANCE(1) << "OnSinksReceived";
@@ -184,6 +184,10 @@ void MediaRouterMojoImpl::OnSinksReceived(
return;
}
+ std::vector<MediaSink> sinks;
mark a. foltz 2017/02/25 01:10:24 nit: reserve length to accommodate internal_sinks.
zhaobin 2017/02/27 21:45:15 Done.
+ for (const auto& internal_sink : internal_sinks)
+ sinks.push_back(internal_sink.sink());
+
auto* sinks_query = it->second.get();
sinks_query->has_cached_result = true;
sinks_query->origins = origins;

Powered by Google App Engine
This is Rietveld 408576698