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

Unified Diff: chrome/browser/language_usage_metrics.h

Issue 15970002: Add the new UMA key 'Translate.LocalesOnDisabledByPrefs'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: chrome/browser/language_usage_metrics.h
diff --git a/chrome/browser/language_usage_metrics.h b/chrome/browser/language_usage_metrics.h
index 72bfec53f85017655e722f7c1c7162907c12af38..3d99c365e202f10f37e02044a8606ce4d63ab08e 100644
--- a/chrome/browser/language_usage_metrics.h
+++ b/chrome/browser/language_usage_metrics.h
@@ -26,15 +26,6 @@ class LanguageUsageMetrics {
// Only the language part (xx in the example) is considered.
static void RecordApplicationLanguage(const std::string& application_locale);
- private:
- // This class must not be instantiated.
- LanguageUsageMetrics();
-
- // Parses |accept_languages| and returns a set of language codes in
- // |languages|.
- static void ParseAcceptLanguages(const std::string& accept_languages,
- std::set<int>* languages);
-
// Parses |locale| and returns the language code. Returns 0 in case of errors.
// The language code is calculated from two alphabets. For example, if
// |locale| is 'en' which represents 'English', the codes of 'e' and 'n' are
@@ -44,8 +35,16 @@ class LanguageUsageMetrics {
// check whether |locale| is valid locale or not strictly.
static int ToLanguageCode(const std::string &locale);
+ private:
+ // This class must not be instantiated.
+ LanguageUsageMetrics();
+
+ // Parses |accept_languages| and returns a set of language codes in
+ // |languages|.
+ static void ParseAcceptLanguages(const std::string& accept_languages,
+ std::set<int>* languages);
+
FRIEND_TEST_ALL_PREFIXES(LanguageUsageMetricsTest, ParseAcceptLanguages);
- FRIEND_TEST_ALL_PREFIXES(LanguageUsageMetricsTest, ToLanguageCode);
};
#endif // CHROME_BROWSER_LANGUAGE_USAGE_METRICS_H_
« no previous file with comments | « no previous file | chrome/browser/language_usage_metrics.cc » ('j') | chrome/browser/translate/translate_manager_metrics.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698