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

Unified Diff: content/browser/media/android/browser_media_player_manager.cc

Issue 505233002: Add UMA to study the video types for mobile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..925aada156823ad16f643da59d3ca132bc050c18 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"
@@ -103,10 +104,18 @@ MediaPlayerAndroid* BrowserMediaPlayerManager::CreateMediaPlayer(
media_player_params.url)) {
media_player_bridge->Initialize();
}
+ std::string path = media_player_params.url.path();
+ if (EndsWith(path, ".m3u8", true) || EndsWith(path, ".m3u", true)) {
+ UMA_HISTOGRAM_BOOLEAN("MobileVideo.IsVideoUrlHLSVideo", true);
+ } else {
+ UMA_HISTOGRAM_BOOLEAN("MobileVideo.IsVideoUrlHLSVideo", false);
Ilya Sherman 2014/08/26 19:54:28 nit: Please write this as bool is_hls_video = End
qinmin 2014/08/27 00:10:00 Done.
+ }
+ UMA_HISTOGRAM_BOOLEAN("MobileVideo.IsRegularVideoUrl", true);
return media_player_bridge;
}
case MEDIA_PLAYER_TYPE_MEDIA_SOURCE: {
+ UMA_HISTOGRAM_BOOLEAN("MobileVideo.IsRegularVideoUrl", false);
Ilya Sherman 2014/08/26 19:54:29 nit: It's generally best to avoid repeating UMA_HI
qinmin 2014/08/27 00:10:00 Done.
return new MediaSourcePlayer(
media_player_params.player_id,
manager,
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698