Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 1701063002: CookieStore: Remove reference counting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@threadsafe
Patch Set: Fix leak Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/safe_browsing_service.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 0a443b2fbe7e6cb04b9e67fc2fcfe0e48a1de167..3aa0ae802ac9a5fb51e64273acaeda6cf30148db 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -129,6 +129,8 @@ class SafeBrowsingURLRequestContextGetter
scoped_refptr<net::URLRequestContextGetter> system_context_getter_;
+ scoped_ptr<net::CookieStore> safe_browsing_cookie_store_;
+
scoped_ptr<net::URLRequestContext> safe_browsing_request_context_;
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
@@ -156,11 +158,13 @@ SafeBrowsingURLRequestContextGetter::GetURLRequestContext() {
safe_browsing_request_context_->CopyFrom(
system_context_getter_->GetURLRequestContext());
}
- safe_browsing_request_context_->set_cookie_store(
+ safe_browsing_cookie_store_ =
content::CreateCookieStore(content::CookieStoreConfig(
CookieFilePath(),
content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES, nullptr,
- nullptr)));
+ nullptr));
+ safe_browsing_request_context_->set_cookie_store(
+ safe_browsing_cookie_store_.get());
}
return safe_browsing_request_context_.get();

Powered by Google App Engine
This is Rietveld 408576698