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

Unified Diff: chrome/renderer/translate/translate_helper_metrics.cc

Issue 14762014: Translate: move UMA related code in TranslateManager to TranslateManagerMetrics (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typos Created 7 years, 7 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 | « chrome/renderer/translate/translate_helper_metrics.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/translate/translate_helper_metrics.cc
diff --git a/chrome/renderer/translate/translate_helper_metrics.cc b/chrome/renderer/translate/translate_helper_metrics.cc
index a014da42470cee214231bc533a468e50829b93ef..308100ae1d000ac67f3e37397dfa72ab3ae6ff3e 100644
--- a/chrome/renderer/translate/translate_helper_metrics.cc
+++ b/chrome/renderer/translate/translate_helper_metrics.cc
@@ -4,11 +4,12 @@
#include "chrome/renderer/translate/translate_helper_metrics.h"
+#include "base/basictypes.h"
#include "base/metrics/histogram.h"
namespace {
-// Constant string values to indicate UMA names. All entry should have
+// Constant string values to indicate UMA names. All entries should have
// a corresponding index in MetricsNameIndex and an entry in |kMetricsEntries|.
const char kRenderer4LanguageDetection[] = "Renderer4.LanguageDetection";
const char kTranslateContentLanguage[] = "Translate.ContentLanguage";
@@ -22,7 +23,7 @@ struct MetricsEntry {
const char* const name;
};
-// This entry table should be updated when new UMA item is added.
+// This entry table should be updated when new UMA items are added.
const MetricsEntry kMetricsEntries[] = {
{ TranslateHelperMetrics::UMA_LANGUAGE_DETECTION,
kRenderer4LanguageDetection },
@@ -38,6 +39,9 @@ const MetricsEntry kMetricsEntries[] = {
kTranslateTimeToTranslate },
};
+COMPILE_ASSERT(arraysize(kMetricsEntries) == TranslateHelperMetrics::UMA_MAX,
+ arraysize_of_kMetricsEntries_should_be_UMA_MAX);
+
} // namespace
namespace TranslateHelperMetrics {
« no previous file with comments | « chrome/renderer/translate/translate_helper_metrics.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698