Index: chrome/browser/translate/translate_infobar_delegate.cc |
diff --git a/chrome/browser/translate/translate_infobar_delegate.cc b/chrome/browser/translate/translate_infobar_delegate.cc |
index 5537e8343721bcaf13dc6b2369c36814b2126275..a5c3b7be5d2b47043043417e5f60415f6b151ca4 100644 |
--- a/chrome/browser/translate/translate_infobar_delegate.cc |
+++ b/chrome/browser/translate/translate_infobar_delegate.cc |
@@ -350,6 +350,16 @@ TranslateInfoBarDelegate::TranslateInfoBarDelegate( |
} |
} |
+bool TranslateInfoBarDelegate::ShouldExpire( |
+ const NavigationController::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 . |
MAD
2011/05/17 16:25:55
Remove extra space before '.'
|
+ if (!details.is_user_initiated_main_frame_load() && !details.is_main_frame) |
+ return false; |
+ |
+ return InfoBarDelegate::ShouldExpireInternal(details); |
+} |
+ |
void TranslateInfoBarDelegate::InfoBarDismissed() { |
if (type_ != BEFORE_TRANSLATE) |
return; |