Chromium Code Reviews| Index: components/translate/core/browser/translate_prefs.h |
| diff --git a/components/translate/core/browser/translate_prefs.h b/components/translate/core/browser/translate_prefs.h |
| index d03e2590061debcd9317873d50af269330d1de37..8a34621be00b329392259b5aa9b4a25b60944f89 100644 |
| --- a/components/translate/core/browser/translate_prefs.h |
| +++ b/components/translate/core/browser/translate_prefs.h |
| @@ -78,6 +78,7 @@ class DenialTimeUpdate { |
| // It is assumed that |prefs_| is alive while this instance is alive. |
| class TranslatePrefs { |
| public: |
| + static const char kPrefLanguageProfile[]; |
| static const char kPrefTranslateSiteBlacklist[]; |
| static const char kPrefTranslateWhitelists[]; |
| static const char kPrefTranslateDeniedCount[]; |
| @@ -165,6 +166,17 @@ class TranslatePrefs { |
| bool ShouldAutoTranslate(const std::string& original_language, |
| std::string* target_language); |
| + // Language and probability pair. |
| + typedef std::pair<std::string, double> LanguageAndProbability; |
|
Lei Zhang
2016/11/17 07:03:28
nit: using LanguageAndProbability = std::pair... i
|
| + typedef std::vector<LanguageAndProbability> LanguageAndProbabilityList; |
| + |
| + // Output the User Profile Profile's (ULP) "reading list" into |list| as |
| + // ordered list of <string, double> pair, sorted by the double in decreasing |
| + // order. Return the confidence of the list or 0.0 if there no ULP "reading |
| + // list". |
| + double GetReadingFromUserLanguageProfile( |
| + LanguageAndProbabilityList* list) const; |
| + |
| static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| static void MigrateUserPrefs(PrefService* user_prefs, |
| const char* accept_languages_pref); |