| Index: components/ntp_snippets/remote/ntp_snippets_fetcher.cc
|
| diff --git a/components/ntp_snippets/remote/ntp_snippets_fetcher.cc b/components/ntp_snippets/remote/ntp_snippets_fetcher.cc
|
| index 8e577878ffa620df986580aaed386f777fdc85f4..526960cb95d2be43805c4177bd10f6ee7f9447d0 100644
|
| --- a/components/ntp_snippets/remote/ntp_snippets_fetcher.cc
|
| +++ b/components/ntp_snippets/remote/ntp_snippets_fetcher.cc
|
| @@ -545,6 +545,16 @@ void NTPSnippetsFetcher::SetUpCommonFetchingParameters(
|
| for (const LanguageModel::LanguageInfo& info : top_languages) {
|
| if (info.language_code != params->ui_language.language_code) {
|
| params->other_top_language = info;
|
| +
|
| + // Report to UMA how important the UI language is.
|
| + DCHECK_GT(params->other_top_language.frequency, 0)
|
| + << "GetTopLanguages() should not return languages with 0 frequency";
|
| + float ratio_ui_in_both_languages = params->ui_language.frequency /
|
| + (params->ui_language.frequency +
|
| + params->other_top_language.frequency);
|
| + UMA_HISTOGRAM_PERCENTAGE(
|
| + "NewTabPage.Languages.UILanguageRatioInTwoTopLanguages",
|
| + ratio_ui_in_both_languages * 100);
|
| break;
|
| }
|
| }
|
|
|