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

Unified Diff: net/url_request/url_request_context_builder.cc

Issue 1818603002: Keep track of ChannelIDService in CookieStore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/DCHECK(false)/NOTREACHED()/ 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/cookies/cookie_store.cc ('k') | net/url_request/url_request_http_job.cc » ('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 7c1e74e21445cf55c1d49cd88e15b666f31421e9..b06857b019270f43a2a2f436cbfa6835ddfb1bdf 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -340,12 +340,14 @@ scoped_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
storage->set_cookie_store(std::move(cookie_store_));
storage->set_channel_id_service(std::move(channel_id_service_));
} else {
- storage->set_cookie_store(
- make_scoped_ptr(new CookieMonster(nullptr, nullptr)));
+ scoped_ptr<CookieStore> cookie_store(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(
- new DefaultChannelIDStore(NULL), context->GetFileTaskRunner())));
+ scoped_ptr<ChannelIDService> channel_id_service(new ChannelIDService(
+ new DefaultChannelIDStore(NULL), context->GetFileTaskRunner()));
+ cookie_store->SetChannelIDServiceID(channel_id_service->GetUniqueID());
+ storage->set_cookie_store(std::move(cookie_store));
+ storage->set_channel_id_service(std::move(channel_id_service));
}
if (sdch_enabled_) {
« no previous file with comments | « net/cookies/cookie_store.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698