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

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

Issue 2675033002: [Media Router] Add MediaSink subtypes (Closed)
Patch Set: resolve code review comments from Mark 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..93fd8cab79049fece79c32a3b2212457d6b7cc51 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(internal_sinks.size());
imcheng 2017/03/01 22:54:18 This actually creates a vector with N default-cons
zhaobin 2017/03/03 23:56:42 Thanks a lot!
zhaobin 2017/03/03 23:56:42 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