Skip to content

Commit

Permalink
fix: backport patch that ensures that cookie store is always created (#…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
brenca authored and codebytere committed Nov 29, 2018
1 parent 165d168 commit 78b88a7
Show file tree
Hide file tree
Showing 6 changed files with 486 additions and 0 deletions.
8 changes: 8 additions & 0 deletions atom/browser/net/url_request_context_getter.cc
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions patches/common/chromium/.patches
Expand Up @@ -76,3 +76,4 @@ cross_site_document_resource_handler.patch
content_allow_embedder_to_prevent_locking_scheme_registry.patch
fix_trackpad_scrolling.patch
mac_fix_form_control_rendering_on_10_14_mojave.patch
ensure_cookie_store.patch

0 comments on commit 78b88a7

Please sign in to comment.