Chromium Code Reviews| 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..1bb9e34ba931e267bcefa00295e329eeb5e14ddf 100644 |
| --- a/chrome/browser/password_manager/password_manager_delegate_impl.cc |
| +++ b/chrome/browser/password_manager/password_manager_delegate_impl.cc |
| @@ -20,9 +20,11 @@ |
| #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" |
| +#include "content/public/common/page_transition_types.h" |
| #include "content/public/common/ssl_status.h" |
| #include "google_apis/gaia/gaia_urls.h" |
| #include "grit/chromium_strings.h" |
| @@ -65,6 +67,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 +160,13 @@ SavePasswordInfoBarDelegate::~SavePasswordInfoBarDelegate() { |
| } |
| } |
| +bool SavePasswordInfoBarDelegate::ShouldExpire( |
| + const content::LoadCommittedDetails& details) const { |
| + bool is_not_redirect = !(details.entry->GetTransitionType() & |
|
vabr (Chromium)
2014/01/09 11:39:38
This change is to get rid of the C4800 warning of
|
| + content::PAGE_TRANSITION_IS_REDIRECT_MASK); |
| + return is_not_redirect && InfoBarDelegate::ShouldExpire(details); |
| +} |
| + |
| int SavePasswordInfoBarDelegate::GetIconID() const { |
| return IDR_INFOBAR_SAVE_PASSWORD; |
| } |