| 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..15a6868e59a6686246a0e34a974f6f8a4ac902a2 100644
|
| --- a/chrome/browser/language_usage_metrics.h
|
| +++ b/chrome/browser/language_usage_metrics.h
|
| @@ -8,10 +8,10 @@
|
| #include <set>
|
| #include <string>
|
|
|
| +#include "base/basictypes.h"
|
| #include "base/gtest_prod_util.h"
|
|
|
| // Methods to record language usage as UMA histograms.
|
| -// Language codes are defined in third_party/cld/languages/proto/languages.pb.h
|
| class LanguageUsageMetrics {
|
| public:
|
| // Records accept languages as a UMA histogram. |accept_languages| is a
|
| @@ -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,15 @@ class LanguageUsageMetrics {
|
| // check whether |locale| is valid locale or not strictly.
|
| static int ToLanguageCode(const std::string &locale);
|
|
|
| + private:
|
| + DISALLOW_IMPLICIT_CONSTRUCTORS(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_
|
|
|