summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_provider_observers.cc
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-01 18:25:42 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-01 18:25:42 +0000
commit7267aa240193abfe839d6e8875e79dc1e5bcd668 (patch)
tree3b1dff1d8d3ed133356860a1a9d15cff2a9650c1 /chrome/browser/automation/automation_provider_observers.cc
parent80d4717057c16dba9ff2e629b85022603252b031 (diff)
downloadchromium_src-7267aa240193abfe839d6e8875e79dc1e5bcd668.zip
chromium_src-7267aa240193abfe839d6e8875e79dc1e5bcd668.tar.gz
chromium_src-7267aa240193abfe839d6e8875e79dc1e5bcd668.tar.bz2
Fix GetTranslateInfo() in Debug
R=dennisjeffrey@chromium.org BUG=86456 TEST= Review URL: http://codereview.chromium.org/7537019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94940 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_provider_observers.cc')
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index d1e434f..155af6c 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -1372,10 +1372,12 @@ void TabLanguageDeterminedObserver::Observe(
type_to_string[TranslateInfoBarDelegate::TRANSLATION_ERROR] =
"TRANSLATION_ERROR";
- bar_info->SetBoolean("always_translate_lang_button_showing",
- translate_bar_->ShouldShowAlwaysTranslateButton());
- bar_info->SetBoolean("never_translate_lang_button_showing",
- translate_bar_->ShouldShowNeverTranslateButton());
+ if (translate_bar_->type() == TranslateInfoBarDelegate::BEFORE_TRANSLATE) {
+ bar_info->SetBoolean("always_translate_lang_button_showing",
+ translate_bar_->ShouldShowAlwaysTranslateButton());
+ bar_info->SetBoolean("never_translate_lang_button_showing",
+ translate_bar_->ShouldShowNeverTranslateButton());
+ }
bar_info->SetString("bar_state", type_to_string[translate_bar_->type()]);
bar_info->SetString("target_lang_code",
translate_bar_->GetTargetLanguageCode());