}
void CookieManager::AllowFileSchemeCookies(bool allow) {
- if (allow == is_file_scheme_cookies_allowed_)
+ if (allow == is_file_scheme_cookies_allowed_ || !eweb_context_)
return;
auto* cookie_manager = eweb_context_->browser_context()
return scoped_refptr<content::URLRequestContextGetterEfl>(request_context_getter_.get());
}
+void CookieManager::EWebContextShutDown() {
+ LOG(INFO) << "EWebContext is shutting down.";
+ eweb_context_ = nullptr;
+}
+
net::CookieStore* CookieManager::GetCookieStore() const {
return request_context_getter_
? request_context_getter_->GetURLRequestContext()->cookie_store()
bool IsFileSchemeCookiesAllowed();
void AllowFileSchemeCookies(bool allow);
+ void EWebContextShutDown();
+
private:
struct EwkGetHostCallback;
auto cbce = static_cast<content::ContentBrowserClientEfl*>(cbc);
cbce->SetBrowserContext(browser_context_.release());
#endif
+ cookieManager()->EWebContextShutDown();
}
void EWebContext::ClearNetworkCache() {
void ewk_cookie_manager_persistent_storage_set(Ewk_Cookie_Manager* manager,
const char* file_name,
- Ewk_Cookie_Persistent_Storage storage)
-{
+ Ewk_Cookie_Persistent_Storage) {
EWK_COOKIE_MANAGER_GET_OR_RETURN(manager, cookie_manager);
EINA_SAFETY_ON_NULL_RETURN(file_name);
- std::string fileName(file_name);
- cookie_manager->SetStoragePath(file_name, true /*persist session*/, storage);
+ cookie_manager->SetStoragePath(file_name, true /*persist session*/,
+ EWK_COOKIE_PERSISTENT_STORAGE_SQLITE);
}
void ewk_cookie_manager_accept_policy_set(Ewk_Cookie_Manager* manager,