| Index: components/ntp_snippets/content_suggestions_metrics.cc
|
| diff --git a/components/ntp_snippets/content_suggestions_metrics.cc b/components/ntp_snippets/content_suggestions_metrics.cc
|
| index cb97256bd8c9cf5d2ba7881c56754fc24dec08d6..33d61743ca4a5a31b617d7eda8f0842074a26c4f 100644
|
| --- a/components/ntp_snippets/content_suggestions_metrics.cc
|
| +++ b/components/ntp_snippets/content_suggestions_metrics.cc
|
| @@ -213,8 +213,14 @@ void RecordContentSuggestionsUsage() {
|
|
|
| base::Time::Exploded now_exploded;
|
| base::Time::Now().LocalExplode(&now_exploded);
|
| - size_t bucket =
|
| - (now_exploded.hour * 60 + now_exploded.minute) / kBucketSizeMins;
|
| + int bucket = (now_exploded.hour * 60 + now_exploded.minute) / kBucketSizeMins;
|
| +
|
| + const char* kWeekdayNames[] = {"Sunday", "Monday", "Tuesday", "Wednesday",
|
| + "Thursday", "Friday", "Saturday"};
|
| + std::string histogram_name(
|
| + base::StringPrintf("%s.%s", kHistogramArticlesUsageTimeLocal,
|
| + kWeekdayNames[now_exploded.day_of_week]));
|
| + UmaHistogramEnumeration(histogram_name, bucket, kNumBuckets);
|
|
|
| UMA_HISTOGRAM_ENUMERATION(kHistogramArticlesUsageTimeLocal, bucket,
|
| kNumBuckets);
|
|
|