Skip to content

Commit

Permalink
fix: flush the cookie store when NetworkContext shuts down
Browse files Browse the repository at this point in the history
  • Loading branch information
brenca committed Nov 29, 2018
1 parent 9fc265e commit 9522ea4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions atom/browser/net/url_request_context_getter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -262,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

0 comments on commit 9522ea4

Please sign in to comment.