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

Unified Diff: net/url_request/url_request_context_builder.cc

Issue 1701063002: CookieStore: Remove reference counting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@threadsafe
Patch Set: merge Created 4 years, 9 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
« no previous file with comments | « net/url_request/url_request_context_builder.h ('k') | net/url_request/url_request_context_getter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context_builder.cc
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index 7066de1a4169343ca50858b3b3264e1d06dbc70b..b0e737f9082d3ab969831507bab25108882c9815 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -257,10 +257,10 @@ void URLRequestContextBuilder::SetInterceptors(
}
void URLRequestContextBuilder::SetCookieAndChannelIdStores(
- const scoped_refptr<CookieStore>& cookie_store,
- scoped_ptr<ChannelIDService> channel_id_service) {
+ scoped_ptr<CookieStore> cookie_store,
+ scoped_ptr<ChannelIDService> channel_id_service) {
DCHECK(cookie_store);
- cookie_store_ = cookie_store;
+ cookie_store_ = std::move(cookie_store);
channel_id_service_ = std::move(channel_id_service);
}
@@ -338,10 +338,11 @@ scoped_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
storage->set_http_auth_handler_factory(std::move(http_auth_handler_factory_));
if (cookie_store_) {
- storage->set_cookie_store(cookie_store_.get());
+ storage->set_cookie_store(std::move(cookie_store_));
storage->set_channel_id_service(std::move(channel_id_service_));
} else {
- storage->set_cookie_store(new CookieMonster(NULL, NULL));
+ storage->set_cookie_store(
+ make_scoped_ptr(new CookieMonster(nullptr, nullptr)));
// TODO(mmenke): This always creates a file thread, even when it ends up
// not being used. Consider lazily creating the thread.
storage->set_channel_id_service(make_scoped_ptr(new ChannelIDService(
« no previous file with comments | « net/url_request/url_request_context_builder.h ('k') | net/url_request/url_request_context_getter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698