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 61a35d83a83cb4f59b4bfcd6fb3defc5a5a3e41e..8b40321aedf143ef0f75e03240542e6c387339a6 100644 |
| --- a/components/translate/core/browser/translate_prefs.h |
| +++ b/components/translate/core/browser/translate_prefs.h |
| @@ -87,6 +87,8 @@ class TranslatePrefs { |
| static const char kPrefTranslateBlockedLanguages[]; |
| static const char kPrefTranslateLastDeniedTimeForLanguage[]; |
| static const char kPrefTranslateTooOftenDeniedForLanguage[]; |
| + static const char kPrefTranslateAutoAlwaysCount[]; |
|
Marti Wong
2017/06/02 07:37:13
2 questions:
- Do I need someone's approval for ad
groby-ooo-7-16
2017/06/07 17:02:49
Prefs don't need approval (AFAIK :). If they're An
Marti Wong
2017/06/09 03:28:26
Talked to Yana.
These are for Android only, at lea
|
| + static const char kPrefTranslateAutoNeverCount[]; |
| // |preferred_languages_pref| is only used on Chrome OS, other platforms must |
| // pass NULL. |
| @@ -149,6 +151,18 @@ class TranslatePrefs { |
| void IncrementTranslationAcceptedCount(const std::string& language); |
| void ResetTranslationAcceptedCount(const std::string& language); |
| + // These methods are used to track how many times the auto-always translation |
| + // has been triggered for a specific language. |
| + int GetTranslationAutoAlwaysCount(const std::string& language) const; |
| + void IncrementTranslationAutoAlwaysCount(const std::string& language); |
| + void ResetTranslationAutoAlwaysCount(const std::string& language); |
| + |
| + // These methods are used to track how many times the auto-never translation |
| + // has been triggered for a specific language. |
| + int GetTranslationAutoNeverCount(const std::string& language) const; |
| + void IncrementTranslationAutoNeverCount(const std::string& language); |
| + void ResetTranslationAutoNeverCount(const std::string& language); |
| + |
| // Update the last time on closing the Translate UI without translation. |
| void UpdateLastDeniedTime(const std::string& language); |
| @@ -220,6 +234,14 @@ class TranslatePrefs { |
| // accepted for a language, creating it if necessary. |
| base::DictionaryValue* GetTranslationAcceptedCountDictionary() const; |
| + // Retrieves the dictionary mapping the number of times auto-always translate |
| + // has been triggered for a language, creating it if necessary. |
| + base::DictionaryValue* GetTranslateAutoAlwaysCountDictionary() const; |
| + |
| + // Retrieves the dictionary mapping the number of times auto-never translate |
| + // has been triggered for a language, creating it if necessary. |
| + base::DictionaryValue* GetTranslationAutoNeverCountDictionary() const; |
|
Marti Wong
2017/06/09 03:28:26
Removed. functions never been used.
|
| + |
| PrefService* prefs_; // Weak. |
| std::string country_; // The country the app runs in. |