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

Unified Diff: components/translate/core/browser/translate_browser_metrics.cc

Issue 131203002: Move LanguageUsageMetrics and TranslateBrowserMetrics to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 11 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: components/translate/core/browser/translate_browser_metrics.cc
diff --git a/chrome/browser/translate/translate_browser_metrics.cc b/components/translate/core/browser/translate_browser_metrics.cc
similarity index 85%
rename from chrome/browser/translate/translate_browser_metrics.cc
rename to components/translate/core/browser/translate_browser_metrics.cc
index a6605bd4e47e100ce44d853d58d84d6f1747e49d..68310551ca5120c25a2ec82e09fc6ca2b7016f77 100644
--- a/chrome/browser/translate/translate_browser_metrics.cc
+++ b/components/translate/core/browser/translate_browser_metrics.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/translate/translate_browser_metrics.h"
+#include "components/translate/core/browser/translate_browser_metrics.h"
#include <string>
#include "base/basictypes.h"
#include "base/metrics/histogram.h"
#include "base/metrics/sparse_histogram.h"
-#include "chrome/browser/language_usage_metrics.h"
+#include "components/language_usage_metrics/language_usage_metrics.h"
namespace {
@@ -63,18 +63,21 @@ void ReportLanguageDetectionError() {
}
void ReportLocalesOnDisabledByPrefs(const std::string& locale) {
- UMA_HISTOGRAM_SPARSE_SLOWLY(kTranslateLocalesOnDisabledByPrefs,
- LanguageUsageMetrics::ToLanguageCode(locale));
+ UMA_HISTOGRAM_SPARSE_SLOWLY(
+ kTranslateLocalesOnDisabledByPrefs,
+ language_usage_metrics::LanguageUsageMetrics::ToLanguageCode(locale));
}
void ReportUndisplayableLanguage(const std::string& language) {
- int language_code = LanguageUsageMetrics::ToLanguageCode(language);
+ int language_code =
+ language_usage_metrics::LanguageUsageMetrics::ToLanguageCode(language);
UMA_HISTOGRAM_SPARSE_SLOWLY(kTranslateUndisplayableLanguage,
language_code);
}
void ReportUnsupportedLanguageAtInitiation(const std::string& language) {
- int language_code = LanguageUsageMetrics::ToLanguageCode(language);
+ int language_code =
+ language_usage_metrics::LanguageUsageMetrics::ToLanguageCode(language);
UMA_HISTOGRAM_SPARSE_SLOWLY(kTranslateUnsupportedLanguageAtInitiation,
language_code);
}

Powered by Google App Engine
This is Rietveld 408576698