Create a new URLSecurityManager that allows explicit settings
This commit is contained in:
parent
859ef0b298
commit
73a60ea3e3
2 changed files with 25 additions and 0 deletions
|
@ -84,6 +84,16 @@ const char kProxyPacUrl[] = "proxy-pac-url";
|
|||
|
||||
} // namespace
|
||||
|
||||
ExplicitURLSecurityManager::ExplicitURLSecurityManager() : allow_default_creds_(false) {}
|
||||
|
||||
bool ExplicitURLSecurityManager::CanUseDefaultCredentials(const GURL& auth_origin) const {
|
||||
return allow_default_creds_;
|
||||
}
|
||||
|
||||
bool ExplicitURLSecurityManager::CanDelegate(const GURL& auth_origin) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string URLRequestContextGetter::Delegate::GetUserAgent() {
|
||||
return base::EmptyString();
|
||||
}
|
||||
|
|
|
@ -30,6 +30,21 @@ namespace brightray {
|
|||
class DevToolsNetworkController;
|
||||
class NetLog;
|
||||
|
||||
class ExplicitURLSecurityManager : public net::URLSecurityManager {
|
||||
public:
|
||||
ExplicitURLSecurityManager();
|
||||
|
||||
virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const override;
|
||||
virtual bool CanDelegate(const GURL& auth_origin) const override;
|
||||
|
||||
void AllowNTLMCredentialsForAllDomains(bool should_allow) { allow_default_creds_ = should_allow; }
|
||||
|
||||
private:
|
||||
bool allow_default_creds_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ExplicitURLSecurityManager);
|
||||
};
|
||||
|
||||
class URLRequestContextGetter : public net::URLRequestContextGetter {
|
||||
public:
|
||||
class Delegate {
|
||||
|
|
Loading…
Reference in a new issue