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

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

Issue 10913238: SPDY proxy authentication support. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Formatting fixups. 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.cc
diff --git a/chrome/browser/password_manager/password_manager.cc b/chrome/browser/password_manager/password_manager.cc
index b3a2a5351d3fd7ac03dff132c4bff60b2747de69..fdd0138b3141358c1da03cefc3fa80a8b1954b6d 100644
--- a/chrome/browser/password_manager/password_manager.cc
+++ b/chrome/browser/password_manager/password_manager.cc
@@ -6,6 +6,7 @@
#include "base/metrics/histogram.h"
#include "base/threading/platform_thread.h"
+#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/password_manager/password_form_manager.h"
#include "chrome/browser/password_manager/password_manager_delegate.h"
@@ -25,6 +26,8 @@ using webkit::forms::PasswordFormMap;
namespace {
+const char kSpdyProxyRealm[] = "/SpdyProxy";
+
// This routine is called when PasswordManagers are constructed.
//
// Currently we report metrics only once at startup. We require
@@ -212,6 +215,11 @@ void PasswordManager::OnPasswordFormsParsed(
for (std::vector<PasswordForm>::const_iterator iter = forms.begin();
iter != forms.end(); ++iter) {
+ // Don't involve the password manager if this form corresponds to
+ // SpdyProxy authentication, as indicated by the realm.
+ if (EndsWith(iter->signon_realm, kSpdyProxyRealm, true))
+ continue;
+
bool ssl_valid = iter->origin.SchemeIsSecure() && !had_ssl_error;
PasswordFormManager* manager =
new PasswordFormManager(delegate_->GetProfile(),
« 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