register cookieable schemes with browser context
This commit is contained in:
parent
52431506ba
commit
2aa1c9e556
3 changed files with 24 additions and 3 deletions
|
@ -88,6 +88,9 @@ AtomBrowserContext::AtomBrowserContext(
|
|||
use_cache_ = true;
|
||||
options.GetBoolean("cache", &use_cache_);
|
||||
|
||||
// Default schemes that should support cookies.
|
||||
cookieable_schemes_ = {"http", "https", "ws", "wss"};
|
||||
|
||||
// Initialize Pref Registry in brightray.
|
||||
InitPrefs();
|
||||
}
|
||||
|
@ -99,6 +102,13 @@ void AtomBrowserContext::SetUserAgent(const std::string& user_agent) {
|
|||
user_agent_ = user_agent;
|
||||
}
|
||||
|
||||
void AtomBrowserContext::SetCookieableSchemes(
|
||||
const std::vector<std::string>& schemes) {
|
||||
if (!schemes.empty())
|
||||
cookieable_schemes_.insert(cookieable_schemes_.end(),
|
||||
schemes.begin(), schemes.end());
|
||||
}
|
||||
|
||||
net::NetworkDelegate* AtomBrowserContext::CreateNetworkDelegate() {
|
||||
return network_delegate_;
|
||||
}
|
||||
|
@ -188,6 +198,10 @@ net::SSLConfigService* AtomBrowserContext::CreateSSLConfigService() {
|
|||
return new AtomSSLConfigService;
|
||||
}
|
||||
|
||||
std::vector<std::string> AtomBrowserContext::GetCookieableSchemes() {
|
||||
return cookieable_schemes_;
|
||||
}
|
||||
|
||||
void AtomBrowserContext::RegisterPrefs(PrefRegistrySimple* pref_registry) {
|
||||
pref_registry->RegisterFilePathPref(prefs::kSelectFileLastDirectory,
|
||||
base::FilePath());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue