Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2588)

Unified Diff: chrome/browser/password_manager/password_manager_delegate_impl.cc

Issue 10913238: SPDY proxy authentication support. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Tidy password_manager changes. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/spdyproxy/http_auth_handler_spdyproxy_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « chrome/browser/net/spdyproxy/http_auth_handler_spdyproxy_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698