Fallback to default behavior if boolean is false
This commit is contained in:
parent
d123c8613d
commit
66a14c5eb5
2 changed files with 10 additions and 3 deletions
|
@ -84,14 +84,20 @@ const char kProxyPacUrl[] = "proxy-pac-url";
|
||||||
|
|
||||||
} // namespace
|
} // 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 {
|
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 {
|
bool ExplicitURLSecurityManager::CanDelegate(const GURL& auth_origin) const {
|
||||||
return false;
|
return orig_url_sec_mgr_->CanDelegate(auth_origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string URLRequestContextGetter::Delegate::GetUserAgent() {
|
std::string URLRequestContextGetter::Delegate::GetUserAgent() {
|
||||||
|
|
|
@ -41,6 +41,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool allow_default_creds_;
|
bool allow_default_creds_;
|
||||||
|
scoped_ptr<net::URLSecurityManager> orig_url_sec_mgr_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ExplicitURLSecurityManager);
|
DISALLOW_COPY_AND_ASSIGN(ExplicitURLSecurityManager);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue