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

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

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
« no previous file with comments | « components/translate/core/browser/translate_prefs.cc ('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_ui_delegate.cc
diff --git a/components/translate/core/browser/translate_ui_delegate.cc b/components/translate/core/browser/translate_ui_delegate.cc
index 78fc294b871d9842d713111b72765f97d7abcedf..1c4c869b962d671dc775a05c831e0b771f3475be 100644
--- a/components/translate/core/browser/translate_ui_delegate.cc
+++ b/components/translate/core/browser/translate_ui_delegate.cc
@@ -180,13 +180,14 @@ void TranslateUIDelegate::TranslationDeclined(bool explicitly_closed) {
if (!translate_driver_->IsOffTheRecord()) {
prefs_->ResetTranslationAcceptedCount(GetOriginalLanguageCode());
prefs_->IncrementTranslationDeniedCount(GetOriginalLanguageCode());
+ prefs_->UpdateLastDeniedTime();
}
// Remember that the user declined the translation so as to prevent showing a
- // translate infobar for that page again. (TranslateManager initiates
- // translations when getting a LANGUAGE_DETERMINED from the page, which
- // happens when a load stops. That could happen multiple times, including
- // after the user already declined the translation.)
+ // translate UI for that page again. (TranslateManager initiates translations
+ // when getting a LANGUAGE_DETERMINED from the page, which happens when a load
+ // stops. That could happen multiple times, including after the user already
+ // declined the translation.)
if (translate_manager_) {
translate_manager_->GetLanguageState().set_translation_declined(true);
UMA_HISTOGRAM_BOOLEAN(kDeclineTranslate, true);
« no previous file with comments | « components/translate/core/browser/translate_prefs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698