| 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/common/media_router/media_source.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "chrome/browser/media/router/media_source_helper.h" | 9 #include "chrome/common/media_router/media_source_helper.h" |
| 10 | 10 |
| 11 namespace media_router { | 11 namespace media_router { |
| 12 | 12 |
| 13 MediaSource::MediaSource(const MediaSource::Id& source_id) : id_(source_id) { | 13 MediaSource::MediaSource(const MediaSource::Id& source_id) : id_(source_id) { |
| 14 GURL url(source_id); | 14 GURL url(source_id); |
| 15 if (IsValidPresentationUrl(url)) | 15 if (IsValidPresentationUrl(url)) |
| 16 url_ = url; | 16 url_ = url; |
| 17 } | 17 } |
| 18 | 18 |
| 19 MediaSource::MediaSource(const GURL& presentation_url) | 19 MediaSource::MediaSource(const GURL& presentation_url) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 33 return id_ == other.id(); | 33 return id_ == other.id(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 std::string MediaSource::ToString() const { | 36 std::string MediaSource::ToString() const { |
| 37 return "MediaSource[" + id_ + "]"; | 37 return "MediaSource[" + id_ + "]"; |
| 38 } | 38 } |
| 39 | 39 |
| 40 MediaSource::MediaSource() {} | 40 MediaSource::MediaSource() {} |
| 41 | 41 |
| 42 } // namespace media_router | 42 } // namespace media_router |
| OLD | NEW |