| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/media/router/media_source.h" | 5 #include "chrome/browser/media/router/media_source.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 namespace media_router { | 9 namespace media_router { |
| 10 | 10 |
| 11 MediaSource::MediaSource(const MediaSource::Id& source_id) : id_(source_id) { | 11 MediaSource::MediaSource(const MediaSource::Id& source_id) : id_(source_id) { |
| 12 } | 12 } |
| 13 | 13 |
| 14 MediaSource::MediaSource() { | |
| 15 } | |
| 16 | |
| 17 MediaSource::~MediaSource() {} | 14 MediaSource::~MediaSource() {} |
| 18 | 15 |
| 19 MediaSource::Id MediaSource::id() const { | 16 MediaSource::Id MediaSource::id() const { |
| 20 return id_; | 17 return id_; |
| 21 } | 18 } |
| 22 | 19 |
| 23 bool MediaSource::Equals(const MediaSource& other) const { | 20 bool MediaSource::operator==(const MediaSource& other) const { |
| 24 return id_ == other.id(); | 21 return id_ == other.id(); |
| 25 } | 22 } |
| 26 | 23 |
| 27 bool MediaSource::Empty() const { | |
| 28 return id_.empty(); | |
| 29 } | |
| 30 | |
| 31 std::string MediaSource::ToString() const { | 24 std::string MediaSource::ToString() const { |
| 32 return "MediaSource[" + id_ + "]"; | 25 return "MediaSource[" + id_ + "]"; |
| 33 } | 26 } |
| 34 | 27 |
| 35 } // namespace media_router | 28 } // namespace media_router |
| OLD | NEW |