diff options
author | ahendrickson@chromium.org <ahendrickson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-16 20:22:30 +0000 |
---|---|---|
committer | ahendrickson@chromium.org <ahendrickson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-16 20:22:30 +0000 |
commit | b4955e7d58c7bb329b6dddc6f33199fe17c7bfa1 (patch) | |
tree | 0685b539d6b9b4e438f82d27422d859c35bfb816 /net/http/url_security_manager_posix.cc | |
parent | 3a06fa5487850ef494aea79f5b46a97d06d31a4f (diff) | |
download | chromium_src-b4955e7d58c7bb329b6dddc6f33199fe17c7bfa1.zip chromium_src-b4955e7d58c7bb329b6dddc6f33199fe17c7bfa1.tar.gz chromium_src-b4955e7d58c7bb329b6dddc6f33199fe17c7bfa1.tar.bz2 |
Refactored to pass the URLSecurityManager via the HttpAuthFactory class to the HttpNetworkSession.
Fixed a bug where the command-line whitelist was not being propagated down to the URLSecurityManager.
BUG=29596
TEST=None
Review URL: http://codereview.chromium.org/1634005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/url_security_manager_posix.cc')
-rw-r--r-- | net/http/url_security_manager_posix.cc | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/net/http/url_security_manager_posix.cc b/net/http/url_security_manager_posix.cc index 5a52576..931d9cc 100644 --- a/net/http/url_security_manager_posix.cc +++ b/net/http/url_security_manager_posix.cc @@ -2,34 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "net/http/http_auth.h" -#include "net/http/http_auth_filter.h" #include "net/http/url_security_manager.h" -#include "googleurl/src/gurl.h" +#include "net/http/http_auth_filter.h" namespace net { -class URLSecurityManagerPosix : public URLSecurityManager { - public: - explicit URLSecurityManagerPosix(const HttpAuthFilter* whitelist) - : URLSecurityManager(whitelist) {} - - // URLSecurityManager methods: - virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const; -}; - -bool URLSecurityManagerPosix::CanUseDefaultCredentials( - const GURL& auth_origin) const { - if (whitelist_) - return whitelist_->IsValid(auth_origin, HttpAuth::AUTH_SERVER); - return false; -} - // static URLSecurityManager* URLSecurityManager::Create( - const HttpAuthFilter* whitelist) { - return new URLSecurityManagerPosix(whitelist); + HttpAuthFilter* whitelist) { + return new URLSecurityManagerWhitelist(whitelist); } } // namespace net |