Chromium Code Reviews| Index: chrome/browser/tab_contents/infobar_delegate.cc |
| diff --git a/chrome/browser/tab_contents/infobar_delegate.cc b/chrome/browser/tab_contents/infobar_delegate.cc |
| index 7b4720eea85541154863ee981eaee5ce182502aa..5db9e637e2c3a8b9f13126974283bec65b936fdd 100644 |
| --- a/chrome/browser/tab_contents/infobar_delegate.cc |
| +++ b/chrome/browser/tab_contents/infobar_delegate.cc |
| @@ -21,6 +21,12 @@ bool InfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const { |
| bool InfoBarDelegate::ShouldExpire( |
| const NavigationController::LoadCommittedDetails& details) const { |
| + // Only hide InfoBars when the user has done something that makes the main |
| + // frame load. We don't want various automatic or subframe navigations making |
| + // it disappear. |
| + if (!details.is_user_initiated_main_frame_load()) |
|
MAD
2011/05/02 19:18:02
Why not do this as part of another method, that on
|
| + return false; |
| + |
| return (contents_unique_id_ != details.entry->unique_id()) || |
| (PageTransition::StripQualifier(details.entry->transition_type()) == |
| PageTransition::RELOAD); |