summaryrefslogtreecommitdiffstats
path: root/chrome/browser/translate
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-21 18:35:11 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-21 18:35:11 +0000
commit300dfbd90dfef6ecb06037f1c9599f4780877565 (patch)
treed3fb2c2fc2d59f6857ca5fcd0ac36a037efe01ea /chrome/browser/translate
parent9276a31166bad9c5845193b2fb6ae916d8bfdde4 (diff)
downloadchromium_src-300dfbd90dfef6ecb06037f1c9599f4780877565.zip
chromium_src-300dfbd90dfef6ecb06037f1c9599f4780877565.tar.gz
chromium_src-300dfbd90dfef6ecb06037f1c9599f4780877565.tar.bz2
Don't rely on user gestures for deciding when to dismiss infobars.
Previously, we looked at the user gesture state when deciding whether to dismiss infobars. Now that WebKit's user gesture state doesn't lie, we can tell that this behavior is incorrect. Page-specific infobars, like translate, should close whenever the main frame navigates to a new page, regardless of whether that navigation was conducted from a user gesture. BUG=86417 Review URL: http://codereview.chromium.org/7205026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89864 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/translate')
-rw-r--r--chrome/browser/translate/translate_infobar_delegate.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/translate/translate_infobar_delegate.cc b/chrome/browser/translate/translate_infobar_delegate.cc
index ee69b0f..5d1e140 100644
--- a/chrome/browser/translate/translate_infobar_delegate.cc
+++ b/chrome/browser/translate/translate_infobar_delegate.cc
@@ -358,7 +358,7 @@ bool TranslateInfoBarDelegate::ShouldExpire(
const content::LoadCommittedDetails& details) const {
// Note: we allow closing this infobar even if the main frame navigation
// was programmatic and not initiated by the user - crbug.com/70261 .
- if (!details.is_user_initiated_main_frame_load() && !details.is_main_frame)
+ if (!details.is_navigation_to_different_page() && !details.is_main_frame)
return false;
return InfoBarDelegate::ShouldExpireInternal(details);