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

Side by Side 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, 8 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/url_request/url_request_context_builder.h" 5 #include "net/url_request/url_request_context_builder.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 http_auth_handler_factory_ = 333 http_auth_handler_factory_ =
334 HttpAuthHandlerRegistryFactory::CreateDefault(context->host_resolver()); 334 HttpAuthHandlerRegistryFactory::CreateDefault(context->host_resolver());
335 } 335 }
336 336
337 storage->set_http_auth_handler_factory(std::move(http_auth_handler_factory_)); 337 storage->set_http_auth_handler_factory(std::move(http_auth_handler_factory_));
338 338
339 if (cookie_store_) { 339 if (cookie_store_) {
340 storage->set_cookie_store(std::move(cookie_store_)); 340 storage->set_cookie_store(std::move(cookie_store_));
341 storage->set_channel_id_service(std::move(channel_id_service_)); 341 storage->set_channel_id_service(std::move(channel_id_service_));
342 } else { 342 } else {
343 storage->set_cookie_store( 343 scoped_ptr<CookieStore> cookie_store(new CookieMonster(nullptr, nullptr));
344 make_scoped_ptr(new CookieMonster(nullptr, nullptr)));
345 // TODO(mmenke): This always creates a file thread, even when it ends up 344 // TODO(mmenke): This always creates a file thread, even when it ends up
346 // not being used. Consider lazily creating the thread. 345 // not being used. Consider lazily creating the thread.
347 storage->set_channel_id_service(make_scoped_ptr(new ChannelIDService( 346 scoped_ptr<ChannelIDService> channel_id_service(new ChannelIDService(
348 new DefaultChannelIDStore(NULL), context->GetFileTaskRunner()))); 347 new DefaultChannelIDStore(NULL), context->GetFileTaskRunner()));
348 cookie_store->SetChannelIDServiceID(channel_id_service->GetUniqueID());
349 storage->set_cookie_store(std::move(cookie_store));
350 storage->set_channel_id_service(std::move(channel_id_service));
349 } 351 }
350 352
351 if (sdch_enabled_) { 353 if (sdch_enabled_) {
352 storage->set_sdch_manager(scoped_ptr<net::SdchManager>(new SdchManager())); 354 storage->set_sdch_manager(scoped_ptr<net::SdchManager>(new SdchManager()));
353 } 355 }
354 356
355 storage->set_transport_security_state( 357 storage->set_transport_security_state(
356 make_scoped_ptr(new TransportSecurityState())); 358 make_scoped_ptr(new TransportSecurityState()));
357 if (!transport_security_persister_path_.empty()) { 359 if (!transport_security_persister_path_.empty()) {
358 context->set_transport_security_persister( 360 context->set_transport_security_persister(
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 } 509 }
508 url_request_interceptors_.clear(); 510 url_request_interceptors_.clear();
509 } 511 }
510 storage->set_job_factory(std::move(top_job_factory)); 512 storage->set_job_factory(std::move(top_job_factory));
511 // TODO(willchan): Support sdch. 513 // TODO(willchan): Support sdch.
512 514
513 return std::move(context); 515 return std::move(context);
514 } 516 }
515 517
516 } // namespace net 518 } // namespace net
OLDNEW
« 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