Chromium Code Reviews| 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)); |
|
mmenke
2016/03/18 22:12:56
Suggestion: Replace URLRequestContext::set_cookie
nharper
2016/03/18 22:31:09
The problem with this is that resetting the cookie
mmenke
2016/03/18 22:36:02
This is true...But this code has the exact same pr
nharper
2016/03/18 23:09:01
Ok, I think I'm understanding how this could work.
mmenke
2016/03/22 15:46:04
We could, if we required the HttpNetworkSession be
|
| } |
| if (sdch_enabled_) { |