Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(801)

Unified Diff: components/translate/core/browser/translate_prefs.h

Issue 345743002: Translate: Hide the bubble if the user denies translating 2 times within 24 hours (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed prefs names Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 6b15c9e1922e05b8045dd4c4bec406e4fa10d649..6da8de7ef71b26079c96e1b596b3eafb89dbd0cd 100644
--- a/components/translate/core/browser/translate_prefs.h
+++ b/components/translate/core/browser/translate_prefs.h
@@ -35,6 +35,8 @@ class TranslatePrefs {
static const char kPrefTranslateDeniedCount[];
static const char kPrefTranslateAcceptedCount[];
static const char kPrefTranslateBlockedLanguages[];
+ static const char kPrefTranslateLastDeniedTime[];
+ static const char kPrefTranslateTooOftenDenied[];
// |preferred_languages_pref| is only used on Chrome OS, other platforms must
// pass NULL.
@@ -87,6 +89,12 @@ class TranslatePrefs {
void IncrementTranslationAcceptedCount(const std::string& language);
void ResetTranslationAcceptedCount(const std::string& language);
+ // Update the last time on closing the Translate UI without translation.
+ void UpdateLastDeniedTime();
+
+ // Returns true if translation is denied too often.
+ bool IsTooOftenDenied() const;
+
// Gets the language list of the language settings.
void GetLanguageList(std::vector<std::string>* languages);
« no previous file with comments | « chrome/browser/translate/chrome_translate_client.cc ('k') | components/translate/core/browser/translate_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698