Index: content/browser/media/android/browser_media_player_manager.cc |
diff --git a/content/browser/media/android/browser_media_player_manager.cc b/content/browser/media/android/browser_media_player_manager.cc |
index c847a275b8f37d484775164dd90079ab69a135e7..429fd510b560299c52c716f7bf26953c2dd78739 100644 |
--- a/content/browser/media/android/browser_media_player_manager.cc |
+++ b/content/browser/media/android/browser_media_player_manager.cc |
@@ -6,6 +6,7 @@ |
#include "base/android/scoped_java_ref.h" |
#include "base/command_line.h" |
+#include "base/metrics/histogram.h" |
#include "content/browser/android/content_view_core_impl.h" |
#include "content/browser/media/android/browser_demuxer_android.h" |
#include "content/browser/media/android/media_resource_getter_impl.h" |
@@ -40,9 +41,16 @@ namespace content { |
// attempting to release inactive media players. |
const int kMediaPlayerThreshold = 1; |
+// Number of media types to be recorded. |
+const int kMaxMediaTypes = 2; |
Ilya Sherman
2014/08/27 22:14:37
nit: This is now unused.
qinmin
2014/08/28 00:30:09
changed to 3 as we combine the 3 types.
On 2014/08
|
+ |
static BrowserMediaPlayerManager::Factory g_factory = NULL; |
static media::MediaUrlInterceptor* media_url_interceptor_ = NULL; |
+void RecordMobileMediaType(bool is_media_url) { |
xhwang
2014/08/27 23:02:21
nit: Won't it be easier if you just report MediaPl
qinmin
2014/08/28 00:30:09
Done.
|
+ UMA_HISTOGRAM_BOOLEAN("Media.Mobile.MediaType", is_media_url); |
xhwang
2014/08/27 23:02:21
nit: Since this only applies to Chrome for Android
qinmin
2014/08/28 00:30:09
Done.
|
+} |
+ |
// static |
void BrowserMediaPlayerManager::RegisterFactory(Factory factory) { |
g_factory = factory; |
@@ -103,10 +111,17 @@ MediaPlayerAndroid* BrowserMediaPlayerManager::CreateMediaPlayer( |
media_player_params.url)) { |
media_player_bridge->Initialize(); |
} |
+ std::string path = media_player_params.url.path(); |
+ bool is_hls_media = EndsWith(path, ".m3u8", true) || |
+ EndsWith(path, ".m3u", true); |
+ UMA_HISTOGRAM_BOOLEAN("Media.Mobile.IsHttpLiveStreamingMedia", |
+ is_hls_media); |
xhwang
2014/08/27 23:02:21
nit:
Since both UMAs are pretty small (having onl
qinmin
2014/08/28 00:30:09
Done.
ddorwin
2014/08/28 00:59:14
drive-by:
Would it make more sense to have a "cont
|
+ RecordMobileMediaType(true); |
return media_player_bridge; |
} |
case MEDIA_PLAYER_TYPE_MEDIA_SOURCE: { |
+ RecordMobileMediaType(false); |
return new MediaSourcePlayer( |
media_player_params.player_id, |
manager, |