summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkuan@chromium.org <kuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-24 15:50:04 +0000
committerkuan@chromium.org <kuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-24 15:50:04 +0000
commit0e8685b1bbc2a43a8640185288e2dd08295b3026 (patch)
treef082c758a51475e0c77cce891cb4da90854b5fed
parent50de4584e631d2e5c905a0147b56c0af9d23974e (diff)
downloadchromium_src-0e8685b1bbc2a43a8640185288e2dd08295b3026.zip
chromium_src-0e8685b1bbc2a43a8640185288e2dd08295b3026.tar.gz
chromium_src-0e8685b1bbc2a43a8640185288e2dd08295b3026.tar.bz2
fix bug to not trigger translation when source language is modified in before-translate infobar
BUG=36666 TEST=verify per bug report. TBR=jeremy Review URL: http://codereview.chromium.org/652229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39895 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/views/infobars/translate_infobars.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/chrome/browser/views/infobars/translate_infobars.cc b/chrome/browser/views/infobars/translate_infobars.cc
index 3d5bb78..1723c4b 100644
--- a/chrome/browser/views/infobars/translate_infobars.cc
+++ b/chrome/browser/views/infobars/translate_infobars.cc
@@ -719,13 +719,9 @@ void TranslateInfoBar::OnLanguageModified(views::MenuButton* menu_button,
SchedulePaint();
// Clear options menu model so that it'll be created with new language.
options_menu_model_.reset();
- // If necessary, update state and translate.
- TranslateInfoBarDelegate::TranslateState state = GetDelegate()->state();
- if (state != TranslateInfoBarDelegate::kTranslating) {
- if (state == TranslateInfoBarDelegate::kBeforeTranslate)
- UpdateState(TranslateInfoBarDelegate::kTranslating);
+ // If necessary, trigger translation.
+ if (GetDelegate()->state() == TranslateInfoBarDelegate::kAfterTranslate)
GetDelegate()->Translate();
- }
}
inline TranslateInfoBarDelegate* TranslateInfoBar::GetDelegate() const {