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

Unified Diff: chrome/browser/media/router/media_sink.h

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/media/router/media_route.cc ('k') | chrome/browser/media/router/media_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/router/media_sink.h
diff --git a/chrome/browser/media/router/media_sink.h b/chrome/browser/media/router/media_sink.h
index e12b6b16f55de968635b3955b6f2484c8dfe3d5e..e348fe21c55977b2412473deb669c94449457164 100644
--- a/chrome/browser/media/router/media_sink.h
+++ b/chrome/browser/media/router/media_sink.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/optional.h"
#include "third_party/icu/source/common/unicode/uversion.h"
namespace U_ICU_NAMESPACE {
@@ -34,19 +35,28 @@ class MediaSink {
MediaSink(const MediaSink::Id& sink_id,
const std::string& name,
const IconType icon_type);
-
MediaSink(const MediaSink& other);
+ MediaSink();
~MediaSink();
+ void set_sink_id(const MediaSink::Id& sink_id) { sink_id_ = sink_id; }
const MediaSink::Id& id() const { return sink_id_; }
+
+ void set_name(const std::string& name) { name_ = name; }
const std::string& name() const { return name_; }
+
void set_description(const std::string& description) {
description_ = description;
}
- const std::string& description() const { return description_; }
+ const base::Optional<std::string>& description() const {
+ return description_;
+ }
+
void set_domain(const std::string& domain) { domain_ = domain; }
- const std::string& domain() const { return domain_; }
+ const base::Optional<std::string>& domain() const { return domain_; }
+
+ void set_icon_type(IconType icon_type) { icon_type_ = icon_type; }
IconType icon_type() const { return icon_type_; }
bool Equals(const MediaSink& other) const;
@@ -71,13 +81,13 @@ class MediaSink {
std::string name_;
// Optional description of the MediaSink.
- std::string description_;
+ base::Optional<std::string> description_;
// Optional domain of the MediaSink.
- std::string domain_;
+ base::Optional<std::string> domain_;
// The type of icon that corresponds with the MediaSink.
- IconType icon_type_;
+ IconType icon_type_ = IconType::GENERIC;
};
} // namespace media_router
« no previous file with comments | « chrome/browser/media/router/media_route.cc ('k') | chrome/browser/media/router/media_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698