Chromium Code Reviews| Index: chrome/common/metrics/metrics_util.h |
| diff --git a/chrome/common/metrics/metrics_util.h b/chrome/common/metrics/metrics_util.h |
| index 306ed09c0779cf7b9edb70e0332d0b2af42bf62b..e6804dc07512846295d5e0be0a2b027016086a2a 100644 |
| --- a/chrome/common/metrics/metrics_util.h |
| +++ b/chrome/common/metrics/metrics_util.h |
| @@ -15,6 +15,15 @@ namespace metrics { |
| // uniquely identifying field trial names and group names. |
| uint32 HashName(const std::string& name); |
| +// 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 |
| +// 101 and 110 respectively, and the language code will be 101 * 256 + 100 = |
| +// 25966. |
| +// |locale| should consist of only lower-case letters. This function doesn't |
| +// check whether |locale| is valid locale or not strictly. |
| +int ToLanguageCode(const std::string &locale); |
|
Ilya Sherman
2013/05/21 22:53:59
This is not an appropriate location for this funct
hajimehoshi
2013/05/22 04:19:27
I'll create chrome/browser/metrics/metrics_util.{c
Ilya Sherman
2013/05/22 07:51:36
This code doesn't belong under metrics/, whether i
hajimehoshi
2013/05/22 08:08:36
Thank you for your quick review. I'll this code t
|
| + |
| } // namespace metrics |
| #endif // CHROME_COMMON_METRICS_METRICS_UTIL_H_ |