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

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

Issue 370523002: Translate: Implement reset the denial state on chrome://translate-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: estade's review Created 6 years, 5 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
« no previous file with comments | « components/translate/core/browser/translate_prefs.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/translate/core/browser/translate_prefs.cc
diff --git a/components/translate/core/browser/translate_prefs.cc b/components/translate/core/browser/translate_prefs.cc
index 3e78d5c8a4c8e89568ed76276415470477880f49..aea183a91f45bee9f8534c51285cf57f7712fdc5 100644
--- a/components/translate/core/browser/translate_prefs.cc
+++ b/components/translate/core/browser/translate_prefs.cc
@@ -278,6 +278,11 @@ bool TranslatePrefs::IsTooOftenDenied() const {
return prefs_->GetBoolean(kPrefTranslateTooOftenDenied);
}
+void TranslatePrefs::ResetDenialState() {
+ prefs_->SetDouble(kPrefTranslateLastDeniedTime, 0);
+ prefs_->SetBoolean(kPrefTranslateTooOftenDenied, false);
+}
+
void TranslatePrefs::GetLanguageList(std::vector<std::string>* languages) {
DCHECK(languages);
DCHECK(languages->empty());
« no previous file with comments | « components/translate/core/browser/translate_prefs.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698