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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2338213005: Look into full URL spec to see whether it is MP4 (Closed)
Patch Set: Simplified the test for "mp4" Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/mime_util_internal.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 4c5d7a3e37e4de3e3fa88be809293cc7e867c2ec..3e506ad669fdb1e3335031d48f969829cd89eb9f 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -796,10 +796,10 @@ bool UseWebMediaPlayerImpl(const GURL& url) {
// Don't use WMPI if the container likely contains a codec we can't decode in
// software and platform decoders are not available.
- if (base::EndsWith(url.path(), ".mp4",
- base::CompareCase::INSENSITIVE_ASCII) &&
- !media::HasPlatformDecoderSupport()) {
- return false;
+ if (!media::HasPlatformDecoderSupport()) {
+ // Assume "mp4" means H264.
piman 2016/09/16 01:45:00 nit: please add a link to the bug. This logic is v
Tima Vaisburd 2016/09/16 19:04:22 Done.
+ if (base::ToLowerASCII(url.spec()).find("mp4") != std::string::npos)
+ return false;
}
// Indicates if the Android MediaPlayer should be used instead of WMPI.
« no previous file with comments | « no previous file | media/base/mime_util_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698