Index: content/renderer/media/android/webmediaplayer_android.cc |
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc |
index 4a1f4f74fde973229147c86413149cdc6101554c..ac32303f190ec440e130268f5720fe308450157b 100644 |
--- a/content/renderer/media/android/webmediaplayer_android.cc |
+++ b/content/renderer/media/android/webmediaplayer_android.cc |
@@ -166,6 +166,27 @@ class SyncTokenClientImpl : public media::VideoFrame::SyncTokenClient { |
namespace content { |
+// static |
+bool WebMediaPlayerAndroid::IsHLSPath(const GURL& url) { |
+ if (!url.SchemeIsHTTPOrHTTPS() && !url.SchemeIsFile()) |
+ return false; |
+ |
+ std::string path = url.path(); |
+ return base::EndsWith(path, ".m3u8", base::CompareCase::INSENSITIVE_ASCII); |
+} |
+ |
+// static |
+bool WebMediaPlayerAndroid::IsHLSURL(const GURL& url) { |
+ if (!url.SchemeIsHTTPOrHTTPS() && !url.SchemeIsFile()) |
+ return false; |
+ |
+ std::string spec = url.spec(); |
+ if (base::EndsWith(spec, ".m3u8", base::CompareCase::INSENSITIVE_ASCII)) |
+ return true; |
+ return (spec.find("m3u8") != std::string::npos); |
+} |
+ |
+ |
watk
2016/01/06 20:06:47
extra newline or subtle style rule?
|
WebMediaPlayerAndroid::WebMediaPlayerAndroid( |
blink::WebFrame* frame, |
blink::WebMediaPlayerClient* client, |
@@ -1928,26 +1949,6 @@ void WebMediaPlayerAndroid::enterFullscreen() { |
suppress_deleting_texture_ = false; |
} |
-// Test whether the path of a URL ends with '.m3u8'. |
-static bool IsHLSPath(const GURL& url) { |
- if (!url.SchemeIsHTTPOrHTTPS() && !url.SchemeIsFile()) |
- return false; |
- |
- std::string path = url.path(); |
- return base::EndsWith(path, ".m3u8", base::CompareCase::INSENSITIVE_ASCII); |
-} |
- |
-// Predict whether NuPlayer will use HTTPLiveSource. |
-static bool IsHLSURL(const GURL& url) { |
- if (!url.SchemeIsHTTPOrHTTPS() && !url.SchemeIsFile()) |
- return false; |
- |
- std::string spec = url.spec(); |
- if (base::EndsWith(spec, ".m3u8", base::CompareCase::INSENSITIVE_ASCII)) |
- return true; |
- return (spec.find("m3u8") != std::string::npos); |
-} |
- |
bool WebMediaPlayerAndroid::IsHLSStream() const { |
const GURL& url = redirected_url_.is_empty() ? url_ : redirected_url_; |
return IsHLSURL(url); |