Index: components/translate/core/browser/translate_manager.cc |
diff --git a/components/translate/core/browser/translate_manager.cc b/components/translate/core/browser/translate_manager.cc |
index 089c6137cd1d00eda469fa923184ecb86f2ba540..f38b7a78900f7b6dc4d752ba2edfff5dc2238a83 100644 |
--- a/components/translate/core/browser/translate_manager.cc |
+++ b/components/translate/core/browser/translate_manager.cc |
@@ -427,8 +427,11 @@ void TranslateManager::NotifyTranslateError(TranslateErrors::Type error_type) { |
void TranslateManager::PageTranslated(const std::string& source_lang, |
const std::string& target_lang, |
TranslateErrors::Type error_type) { |
- language_state_.SetCurrentLanguage(target_lang); |
+ if (error_type == TranslateErrors::NONE) |
+ language_state_.SetCurrentLanguage(target_lang); |
+ |
language_state_.set_translation_pending(false); |
+ language_state_.set_translation_error(error_type != TranslateErrors::NONE); |
if ((error_type == TranslateErrors::NONE) && |
source_lang != translate::kUnknownLanguageCode && |