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

Unified Diff: chrome/browser/media/android/remote/record_cast_action.cc

Issue 2886933003: Use stricter type checking in UMA_HISTOGRAM_ENUMERATION (Closed)
Patch Set: simplify type checking Created 3 years, 5 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
Index: chrome/browser/media/android/remote/record_cast_action.cc
diff --git a/chrome/browser/media/android/remote/record_cast_action.cc b/chrome/browser/media/android/remote/record_cast_action.cc
index b25a5e4754a437ee85d7a5aadd03cddd86de601d..2d547bf069f3d071a9ab801cf8c0684aa9e2029d 100644
--- a/chrome/browser/media/android/remote/record_cast_action.cc
+++ b/chrome/browser/media/android/remote/record_cast_action.cc
@@ -45,8 +45,9 @@ namespace remote_media {
static void RecordRemotePlaybackDeviceSelected(JNIEnv*,
const JavaParamRef<jclass>&,
jint device_type) {
- UMA_HISTOGRAM_ENUMERATION(
- "Cast.Sender.DeviceType", device_type, REMOTE_PLAYBACK_DEVICE_TYPE_COUNT);
+ UMA_HISTOGRAM_ENUMERATION("Cast.Sender.DeviceType",
+ static_cast<RemotePlaybackDeviceType>(device_type),
+ REMOTE_PLAYBACK_DEVICE_TYPE_COUNT);
}
static void RecordCastPlayRequested(JNIEnv*, const JavaParamRef<jclass>&) {
@@ -82,7 +83,9 @@ static void RecordCastYouTubePlayerResult(JNIEnv*,
static void RecordCastMediaType(JNIEnv*,
const JavaParamRef<jclass>&,
jint media_type) {
- UMA_HISTOGRAM_ENUMERATION("Cast.Sender.CastMediaType", media_type,
+ UMA_HISTOGRAM_ENUMERATION(
+ "Cast.Sender.CastMediaType",
+ static_cast<media::container_names::MediaContainerName>(media_type),
media::container_names::CONTAINER_MAX);
}
« no previous file with comments | « chrome/browser/engagement/important_sites_util.cc ('k') | chrome/browser/metrics/android_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698