Index: net/http/url_security_manager_win.cc |
diff --git a/net/http/url_security_manager_win.cc b/net/http/url_security_manager_win.cc |
index b0dcaa0beb80be7c8ae87f70d50167544acb8100..d11e33b15917a1a1bee4cfa83daf85b9a1919658 100644 |
--- a/net/http/url_security_manager_win.cc |
+++ b/net/http/url_security_manager_win.cc |
@@ -26,30 +26,30 @@ |
namespace net { |
-class URLSecurityManagerWin : public URLSecurityManager { |
+class URLSecurityManagerWin : public URLSecurityManagerWhitelist { |
public: |
- explicit URLSecurityManagerWin(const HttpAuthFilter* whitelist_delegate); |
+ URLSecurityManagerWin(); |
+ ~URLSecurityManagerWin() override; |
// URLSecurityManager methods: |
bool CanUseDefaultCredentials(const GURL& auth_origin) const override; |
- bool CanDelegate(const GURL& auth_origin) const override; |
private: |
bool EnsureSystemSecurityManager(); |
base::win::ScopedComPtr<IInternetSecurityManager> security_manager_; |
- scoped_ptr<const HttpAuthFilter> whitelist_delegate_; |
DISALLOW_COPY_AND_ASSIGN(URLSecurityManagerWin); |
}; |
-URLSecurityManagerWin::URLSecurityManagerWin( |
- const HttpAuthFilter* whitelist_delegate) |
- : whitelist_delegate_(whitelist_delegate) { |
-} |
+URLSecurityManagerWin::URLSecurityManagerWin() {} |
+URLSecurityManagerWin::~URLSecurityManagerWin() {} |
bool URLSecurityManagerWin::CanUseDefaultCredentials( |
const GURL& auth_origin) const { |
+ if (HasDefaultWhitelist()) { |
+ return URLSecurityManagerWhitelist::CanUseDefaultCredentials(auth_origin); |
+ } |
if (!const_cast<URLSecurityManagerWin*>(this)->EnsureSystemSecurityManager()) |
return false; |
@@ -101,14 +101,7 @@ bool URLSecurityManagerWin::CanUseDefaultCredentials( |
return false; |
} |
} |
- |
-bool URLSecurityManagerWin::CanDelegate(const GURL& auth_origin) const { |
- // TODO(cbentzel): Could this just use the security zone as well? Apparently |
- // this is what IE does as well. |
- if (whitelist_delegate_.get()) |
- return whitelist_delegate_->IsValid(auth_origin, HttpAuth::AUTH_SERVER); |
- return false; |
-} |
+// TODO(cbentzel): Could CanDelegate use the security zone as well? |
bool URLSecurityManagerWin::EnsureSystemSecurityManager() { |
if (!security_manager_.get()) { |
@@ -124,14 +117,9 @@ bool URLSecurityManagerWin::EnsureSystemSecurityManager() { |
} |
// static |
-URLSecurityManager* URLSecurityManager::Create( |
- const HttpAuthFilter* whitelist_default, |
- const HttpAuthFilter* whitelist_delegate) { |
+URLSecurityManager* URLSecurityManager::Create() { |
// If we have a whitelist, just use that. |
asanka
2015/11/04 16:05:44
Comment no longer accurate.
aberent
2015/11/06 13:57:34
Done.
|
- if (whitelist_default) |
- return new URLSecurityManagerWhitelist(whitelist_default, |
- whitelist_delegate); |
- return new URLSecurityManagerWin(whitelist_delegate); |
+ return new URLSecurityManagerWin; |
} |
} // namespace net |