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

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: 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
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 b0e737f9082d3ab969831507bab25108882c9815..66dc444188368ffcc933e9c5c89dbcd98a4de439 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -341,12 +341,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_) {

Powered by Google App Engine
This is Rietveld 408576698