Index: chrome/browser/password_manager/password_manager_delegate_impl.cc |
diff --git a/chrome/browser/password_manager/password_manager_delegate_impl.cc b/chrome/browser/password_manager/password_manager_delegate_impl.cc |
index 9d63a906a8a6c46a81318048474feffb535471b3..dbfe80543b272616aa32c6a251ac74979ad77b74 100644 |
--- a/chrome/browser/password_manager/password_manager_delegate_impl.cc |
+++ b/chrome/browser/password_manager/password_manager_delegate_impl.cc |
@@ -20,6 +20,7 @@ |
#include "components/autofill/content/common/autofill_messages.h" |
#include "components/autofill/core/browser/autofill_manager.h" |
#include "components/autofill/core/common/password_form.h" |
+#include "content/public/browser/navigation_details.h" |
#include "content/public/browser/navigation_entry.h" |
#include "content/public/browser/render_view_host.h" |
#include "content/public/browser/web_contents.h" |
@@ -65,6 +66,10 @@ class SavePasswordInfoBarDelegate : public ConfirmInfoBarDelegate { |
const std::string& uma_histogram_suffix); |
virtual ~SavePasswordInfoBarDelegate(); |
+ // InfoBarDelegate |
+ virtual bool ShouldExpire(const content::LoadCommittedDetails& details) |
+ const OVERRIDE; |
+ |
// ConfirmInfoBarDelegate |
virtual int GetIconID() const OVERRIDE; |
virtual Type GetInfoBarType() const OVERRIDE; |
@@ -154,6 +159,13 @@ SavePasswordInfoBarDelegate::~SavePasswordInfoBarDelegate() { |
} |
} |
+bool SavePasswordInfoBarDelegate::ShouldExpire( |
+ const content::LoadCommittedDetails& details) const { |
+ bool is_redirect = details.entry->GetTransitionType() & |
+ content::PageTransition::PAGE_TRANSITION_IS_REDIRECT_MASK; |
+ return !is_redirect && InfoBarDelegate::ShouldExpire(details); |
+} |
+ |
int SavePasswordInfoBarDelegate::GetIconID() const { |
return IDR_INFOBAR_SAVE_PASSWORD; |
} |