diff options
Diffstat (limited to 'chrome/browser/translate/translate_manager.cc')
-rw-r--r-- | chrome/browser/translate/translate_manager.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc index 3968de9..e58cc9d 100644 --- a/chrome/browser/translate/translate_manager.cc +++ b/chrome/browser/translate/translate_manager.cc @@ -352,9 +352,11 @@ void TranslateManager::InitiateTranslation(TabContents* tab, // automatically translate. Note that in incognito mode we disable that // feature; the user will get an infobar, so they can control whether the // page's text is sent to the translate server. - if (TranslatePrefs::ShouldAutoTranslate(prefs, page_lang, target_lang) && - !tab->profile()->IsOffTheRecord()) { - TranslatePage(tab, page_lang, target_lang); + std::string auto_target_lang; + if (!tab->profile()->IsOffTheRecord() && + TranslatePrefs::ShouldAutoTranslate(prefs, page_lang, + &auto_target_lang)) { + TranslatePage(tab, page_lang, auto_target_lang); return; } |