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

Unified Diff: chrome/browser/translate/translate_infobar_delegate.cc

Issue 23923007: Bug fix: Append a language to the list after blocking it for Translate on Chrome OS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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: chrome/browser/translate/translate_infobar_delegate.cc
diff --git a/chrome/browser/translate/translate_infobar_delegate.cc b/chrome/browser/translate/translate_infobar_delegate.cc
index 9cabbaa637fe8771b12e76e185e546d1f4d2cb27..39d4980013826762cafb01a5a3897c3a1f2dfd09 100644
--- a/chrome/browser/translate/translate_infobar_delegate.cc
+++ b/chrome/browser/translate/translate_infobar_delegate.cc
@@ -211,7 +211,8 @@ void TranslateInfoBarDelegate::AlwaysTranslatePageLanguage() {
void TranslateInfoBarDelegate::NeverTranslatePageLanguage() {
std::string original_lang = original_language_code();
- DCHECK(!prefs_.IsBlockedLanguage(original_lang));
+ // The language might be already blocked when the language was blocked but
+ // removed from the language list of chrome://settings/languages.
Takashi Toyoshima 2013/09/09 12:26:11 This comment is difficult to understand... IIUC,
hajimehoshi 2013/09/10 03:21:45 I aimed to say the other thing. 1. Open a Japanes
hajimehoshi 2013/09/10 05:23:04 Done.
prefs_.BlockLanguage(original_lang);
RemoveSelf();
}

Powered by Google App Engine
This is Rietveld 408576698