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

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

Issue 2675033002: [Media Router] Add MediaSink subtypes (Closed)
Patch Set: resolve code review comments from Derek and Mark Created 3 years, 9 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/media_sink.h
diff --git a/chrome/browser/media/router/media_sink.h b/chrome/browser/media/router/media_sink.h
index e348fe21c55977b2412473deb669c94449457164..b1dd2941e51bc25932c2ee4a17be674d6af75ab8 100644
--- a/chrome/browser/media/router/media_sink.h
+++ b/chrome/browser/media/router/media_sink.h
@@ -17,6 +17,7 @@ class Collator;
namespace media_router {
// Represents a sink to which media can be routed.
+// TODO(zhaobin): convert MediaSink into a struct.
class MediaSink {
public:
using Id = std::string;
@@ -59,8 +60,13 @@ class MediaSink {
void set_icon_type(IconType icon_type) { icon_type_ = icon_type; }
IconType icon_type() const { return icon_type_; }
+ // This method only compares IDs.
bool Equals(const MediaSink& other) const;
+ // This method compares all fields.
+ bool operator==(const MediaSink& other) const;
+ bool operator!=(const MediaSink& other) const;
+
// Compares |this| to |other| first by their icon types, then their names
// using |collator|, and finally their IDs.
bool CompareUsingCollator(const MediaSink& other,
« no previous file with comments | « chrome/browser/media/router/discovery/media_sink_internal_unittest.cc ('k') | chrome/browser/media/router/media_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698