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

Unified Diff: chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc

Issue 2666873006: [Media Router] Convert to use typemaps for media_router.mojom. (Closed)
Patch Set: Remove DCHECK since tests are hitting the code path 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
« no previous file with comments | « chrome/browser/ui/ash/cast_config_client_media_router.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
diff --git a/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc b/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
index 151e184b00573d2d7fcb3276bda7dc5f015cc2fc..3ffe291cb00ca5b0714dbec46f5577e8cef00204 100644
--- a/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
+++ b/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
@@ -98,15 +98,15 @@ std::unique_ptr<base::DictionaryValue> SinksAndIdentityToValue(
sink_val->SetString("id", sink.id());
sink_val->SetString("name", sink.name());
sink_val->SetInteger("iconType", sink.icon_type());
- if (!sink.description().empty())
- sink_val->SetString("description", sink.description());
+ if (sink.description())
+ sink_val->SetString("description", *sink.description());
bool is_pseudo_sink =
base::StartsWith(sink.id(), "pseudo:", base::CompareCase::SENSITIVE);
- if (!user_domain.empty() && !sink.domain().empty()) {
- std::string domain = sink.domain();
+ if (!user_domain.empty() && sink.domain() && !sink.domain()->empty()) {
+ std::string domain = *sink.domain();
// Convert default domains to user domain
- if (sink.domain() == "default") {
+ if (domain == "default") {
domain = user_domain;
if (domain == Profile::kNoHostedDomainFound) {
// Default domain will be empty for non-dasher accounts.
« no previous file with comments | « chrome/browser/ui/ash/cast_config_client_media_router.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698