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

Side by Side Diff: chrome/browser/media/router/media_source.cc

Issue 2771413003: Move c/b/media/router/mojo/*.mojom to chrome/common/media_router/mojo/*.mojom (Closed)
Patch Set: Rebase Created 3 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/media/router/media_source.h"
6
7 #include <string>
8
9 #include "chrome/browser/media/router/media_source_helper.h"
10
11 namespace media_router {
12
13 MediaSource::MediaSource(const MediaSource::Id& source_id) : id_(source_id) {
14 GURL url(source_id);
15 if (IsValidPresentationUrl(url))
16 url_ = url;
17 }
18
19 MediaSource::MediaSource(const GURL& presentation_url)
20 : id_(presentation_url.spec()), url_(presentation_url) {}
21
22 MediaSource::~MediaSource() {}
23
24 MediaSource::Id MediaSource::id() const {
25 return id_;
26 }
27
28 GURL MediaSource::url() const {
29 return url_;
30 }
31
32 bool MediaSource::operator==(const MediaSource& other) const {
33 return id_ == other.id();
34 }
35
36 std::string MediaSource::ToString() const {
37 return "MediaSource[" + id_ + "]";
38 }
39
40 MediaSource::MediaSource() {}
41
42 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698