fix: backport patch that ensures that cookie store is always created (#15836)
* fix: backport patch that ensures that cookie store is always created * fix: disable cookie encryption * fix: flush the cookie store when NetworkContext shuts down * test: add test for cookie store persistance * Update patches/common/chromium/ensure_cookie_store.patch Co-Authored-By: brenca <benecene@gmail.com> * Update patches/common/chromium/ensure_cookie_store.patch Co-Authored-By: brenca <benecene@gmail.com>
This commit is contained in:
parent
165d168ee5
commit
78b88a70bb
6 changed files with 486 additions and 0 deletions
|
@ -188,6 +188,9 @@ URLRequestContextGetter::Handle::CreateNetworkContextParams() {
|
|||
base_path.Append(chrome::kChannelIDFilename);
|
||||
network_context_params->restore_old_session_cookies = false;
|
||||
network_context_params->persist_session_cookies = false;
|
||||
// TODO(deepak1556): Matches the existing behavior https://git.io/fxHMl,
|
||||
// enable encryption as a followup.
|
||||
network_context_params->enable_encrypted_cookies = false;
|
||||
}
|
||||
|
||||
// TODO(deepak1556): Decide the stand on chrome ct policy and
|
||||
|
@ -259,6 +262,11 @@ void URLRequestContextGetter::NotifyContextShuttingDown(
|
|||
std::unique_ptr<ResourceContext> resource_context) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||
|
||||
// todo(brenca): remove once C70 lands
|
||||
if (url_request_context_ && url_request_context_->cookie_store()) {
|
||||
url_request_context_->cookie_store()->FlushStore(base::NullCallback());
|
||||
}
|
||||
|
||||
context_shutting_down_ = true;
|
||||
resource_context.reset();
|
||||
net::URLRequestContextGetter::NotifyContextShuttingDown();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue