Fallback to default behavior if boolean is false

This commit is contained in:
Paul Betts 2015-10-16 16:43:03 -07:00
parent d123c8613d
commit 66a14c5eb5
2 changed files with 10 additions and 3 deletions

View file

@ -84,14 +84,20 @@ const char kProxyPacUrl[] = "proxy-pac-url";
} // namespace
ExplicitURLSecurityManager::ExplicitURLSecurityManager() : allow_default_creds_(false) {}
ExplicitURLSecurityManager::ExplicitURLSecurityManager() :
allow_default_creds_(false),
orig_url_sec_mgr_(net::URLSecurityManager::Create(NULL, NULL)) {}
bool ExplicitURLSecurityManager::CanUseDefaultCredentials(const GURL& auth_origin) const {
return allow_default_creds_;
if (allow_default_creds_) {
return true;
}
return orig_url_sec_mgr_->CanUseDefaultCredentials(auth_origin);
}
bool ExplicitURLSecurityManager::CanDelegate(const GURL& auth_origin) const {
return false;
return orig_url_sec_mgr_->CanDelegate(auth_origin);
}
std::string URLRequestContextGetter::Delegate::GetUserAgent() {

View file

@ -41,6 +41,7 @@ public:
private:
bool allow_default_creds_;
scoped_ptr<net::URLSecurityManager> orig_url_sec_mgr_;
DISALLOW_COPY_AND_ASSIGN(ExplicitURLSecurityManager);
};