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

Unified Diff: chrome/browser/media/router/media_router_type_converters.cc

Issue 1475843002: [MR] Add description field to MediaSink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/media_router_type_converters.cc
diff --git a/chrome/browser/media/router/media_router_type_converters.cc b/chrome/browser/media/router/media_router_type_converters.cc
index 627bf9de3347246fd26ee564af6bb5f092a3bc7c..6541dbfb4a824a71952b271c4856676ac8f614d7 100644
--- a/chrome/browser/media/router/media_router_type_converters.cc
+++ b/chrome/browser/media/router/media_router_type_converters.cc
@@ -59,8 +59,12 @@ media_router::interfaces::MediaSink::IconType SinkIconTypeToMojo(
media_router::MediaSink
TypeConverter<media_router::MediaSink, MediaSinkPtr>::Convert(
const MediaSinkPtr& input) {
- return media_router::MediaSink(input->sink_id, input->name,
- SinkIconTypeFromMojo(input->icon_type));
+ media_router::MediaSink sink(input->sink_id, input->name,
+ SinkIconTypeFromMojo(input->icon_type));
+ if (!input->description.get().empty())
+ sink.set_description(input->description);
+
+ return sink;
}
// static
« no previous file with comments | « chrome/browser/media/router/media_router.mojom ('k') | chrome/browser/media/router/media_router_type_converters_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698