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 6360be4dd21e0fd1058a7a71b22aa46586687437..c0ff37a8e1eacbef502f4d7f1b04334733db1359 100644 |
| --- a/chrome/browser/password_manager/password_manager_delegate_impl.cc |
| +++ b/chrome/browser/password_manager/password_manager_delegate_impl.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/memory/singleton.h" |
| #include "base/metrics/histogram.h" |
| +#include "base/string_piece.h" |
| #include "base/utf_string_conversions.h" |
| #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" |
| #include "chrome/browser/autofill/autofill_manager.h" |
| @@ -28,6 +29,12 @@ |
| #include "ui/base/resource/resource_bundle.h" |
| #include "webkit/forms/password_form.h" |
| +namespace { |
| + |
| +const char kSpdyProxyRealm[] = "/SpdyProxy"; |
| + |
| +} // namespace |
| + |
| // After a successful *new* login attempt, we take the PasswordFormManager in |
| // provisional_save_manager_ and move it to a SavePasswordInfoBarDelegate while |
| // the user makes up their mind with the "save password" infobar. Note if the |
| @@ -150,6 +157,11 @@ void PasswordManagerDelegateImpl::AddSavePasswordInfoBarIfPermitted( |
| } |
| #endif |
| + // Don't show the password manager infobar if this form corresponds to |
| + // SpdyProxy authentication, as indicated by the realm. |
| + if (base::StringPiece(form_to_save->realm()).ends_with(kSpdyProxyRealm)) |
|
Ilya Sherman
2012/09/25 22:31:07
nit: Please use the EndsWith() function from base/
Michael Piatek
2012/09/26 23:08:34
Done.
|
| + return; |
| + |
| tab_contents_->infobar_tab_helper()->AddInfoBar( |
| new SavePasswordInfoBarDelegate( |
| tab_contents_->infobar_tab_helper(), form_to_save)); |