Fix option for persisting session cookies (fixes issue #2720, see issue #2622)

This commit is contained in:
Marshall Greenblatt 2019-07-25 15:27:15 -04:00
parent d82624411e
commit 4c70c67042
2 changed files with 7 additions and 0 deletions

View File

@ -288,6 +288,10 @@ void CefBrowserContext::Initialize() {
CefString(&context->settings().accept_language_list);
}
if (!!settings_.persist_session_cookies) {
set_should_persist_session_cookies(true);
}
key_ = std::make_unique<ProfileKey>(GetPath());
SimpleKeyMap::GetInstance()->Associate(this, key_.get());

View File

@ -189,6 +189,9 @@ class CefBrowserContext : public ChromeProfileStub,
// Values checked in ProfileNetworkContextService::CreateNetworkContextParams
// when creating the NetworkContext.
bool ShouldRestoreOldSessionCookies() override {
return should_persist_session_cookies_;
}
bool ShouldPersistSessionCookies() override {
return should_persist_session_cookies_;
}