Commit 32809e9e authored by mathp@chromium.org's avatar mathp@chromium.org

[Android NTP] Use UMA histograms instead of local ones.

An oversight, the histograms should have the UMA_ prefix.

BUG=385159

Review URL: https://codereview.chromium.org/343643002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278215 0039d316-1c4b-4281-b951-d872f2087c98
parent bb279188
...@@ -278,7 +278,7 @@ void MostVisitedSites::RecordOpenedMostVisitedItem(JNIEnv* env, ...@@ -278,7 +278,7 @@ void MostVisitedSites::RecordOpenedMostVisitedItem(JNIEnv* env,
jint index) { jint index) {
switch (mv_source_) { switch (mv_source_) {
case TOP_SITES: { case TOP_SITES: {
HISTOGRAM_SPARSE_SLOWLY(kOpenedItemClientHistogramName, index); UMA_HISTOGRAM_SPARSE_SLOWLY(kOpenedItemClientHistogramName, index);
break; break;
} }
case SUGGESTIONS_SERVICE: { case SUGGESTIONS_SERVICE: {
...@@ -289,7 +289,7 @@ void MostVisitedSites::RecordOpenedMostVisitedItem(JNIEnv* env, ...@@ -289,7 +289,7 @@ void MostVisitedSites::RecordOpenedMostVisitedItem(JNIEnv* env,
server_suggestions_.suggestions(index).providers(0)); server_suggestions_.suggestions(index).providers(0));
LogHistogramEvent(histogram, index, num_sites_); LogHistogramEvent(histogram, index, num_sites_);
} else { } else {
HISTOGRAM_SPARSE_SLOWLY(kOpenedItemServerHistogramName, index); UMA_HISTOGRAM_SPARSE_SLOWLY(kOpenedItemServerHistogramName, index);
} }
} }
break; break;
...@@ -353,9 +353,9 @@ void MostVisitedSites::OnMostVisitedURLsAvailable( ...@@ -353,9 +353,9 @@ void MostVisitedSites::OnMostVisitedURLsAvailable(
mv_source_ = TOP_SITES; mv_source_ = TOP_SITES;
int num_tiles = urls.size(); int num_tiles = urls.size();
HISTOGRAM_SPARSE_SLOWLY(kNumTilesHistogramName, num_tiles); UMA_HISTOGRAM_SPARSE_SLOWLY(kNumTilesHistogramName, num_tiles);
for (int i = 0; i < num_tiles; ++i) { for (int i = 0; i < num_tiles; ++i) {
HISTOGRAM_SPARSE_SLOWLY(kImpressionClientHistogramName, i); UMA_HISTOGRAM_SPARSE_SLOWLY(kImpressionClientHistogramName, i);
} }
JNIEnv* env = AttachCurrentThread(); JNIEnv* env = AttachCurrentThread();
...@@ -389,10 +389,10 @@ void MostVisitedSites::OnSuggestionsProfileAvailable( ...@@ -389,10 +389,10 @@ void MostVisitedSites::OnSuggestionsProfileAvailable(
kImpressionServerHistogramFormat, suggestion.providers(0)); kImpressionServerHistogramFormat, suggestion.providers(0));
LogHistogramEvent(histogram, i, num_sites_); LogHistogramEvent(histogram, i, num_sites_);
} else { } else {
HISTOGRAM_SPARSE_SLOWLY(kImpressionServerHistogramName, i); UMA_HISTOGRAM_SPARSE_SLOWLY(kImpressionServerHistogramName, i);
} }
} }
HISTOGRAM_SPARSE_SLOWLY(kNumTilesHistogramName, i); UMA_HISTOGRAM_SPARSE_SLOWLY(kNumTilesHistogramName, i);
mv_source_ = SUGGESTIONS_SERVICE; mv_source_ = SUGGESTIONS_SERVICE;
// Keep a copy of the suggestions for eventual logging. // Keep a copy of the suggestions for eventual logging.
...@@ -454,12 +454,12 @@ void MostVisitedSites::OnSuggestionsThumbnailAvailable( ...@@ -454,12 +454,12 @@ void MostVisitedSites::OnSuggestionsThumbnailAvailable(
} }
void MostVisitedSites::RecordUMAMetrics() { void MostVisitedSites::RecordUMAMetrics() {
HISTOGRAM_SPARSE_SLOWLY(kNumLocalThumbnailTilesHistogramName, UMA_HISTOGRAM_SPARSE_SLOWLY(kNumLocalThumbnailTilesHistogramName,
num_local_thumbs_); num_local_thumbs_);
num_local_thumbs_ = 0; num_local_thumbs_ = 0;
HISTOGRAM_SPARSE_SLOWLY(kNumEmptyTilesHistogramName, num_empty_thumbs_); UMA_HISTOGRAM_SPARSE_SLOWLY(kNumEmptyTilesHistogramName, num_empty_thumbs_);
num_empty_thumbs_ = 0; num_empty_thumbs_ = 0;
HISTOGRAM_SPARSE_SLOWLY(kNumServerTilesHistogramName, num_server_thumbs_); UMA_HISTOGRAM_SPARSE_SLOWLY(kNumServerTilesHistogramName, num_server_thumbs_);
num_server_thumbs_ = 0; num_server_thumbs_ = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment