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 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_ID_H_ | 5 #include "chrome/browser/media/router/presentation_helper.h" |
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_ID_H_ | |
7 | 6 |
8 #include <string> | 7 #include "url/gurl.h" |
9 | 8 |
10 namespace media_router { | 9 namespace media_router { |
11 | 10 |
12 using MediaRouteId = std::string; | 11 bool IsValidPresentationUrl(const std::string& url) { |
| 12 GURL gurl(url); |
| 13 return gurl.is_valid() && gurl.SchemeIsHTTPOrHTTPS(); |
| 14 } |
13 | 15 |
14 } // namespace media_router | 16 } // namespace media_router |
15 | |
16 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTE_ID_H_ | |
OLD | NEW |