mirror of
https://github.com/electron/electron.git
synced 2026-01-28 00:38:35 -05:00
Fallback to default behavior if boolean is false
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -41,6 +41,7 @@ public:
|
||||
|
||||
private:
|
||||
bool allow_default_creds_;
|
||||
scoped_ptr<net::URLSecurityManager> orig_url_sec_mgr_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ExplicitURLSecurityManager);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user