OLD | NEW |
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 "chrome/browser/profiles/profile_impl_io_data.h" | 5 #include "chrome/browser/profiles/profile_impl_io_data.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 monitor->AddBakedInConfigs(); | 471 monitor->AddBakedInConfigs(); |
472 monitor->SetDiscardUploads(!GetMetricsEnabledStateOnIOThread()); | 472 monitor->SetDiscardUploads(!GetMetricsEnabledStateOnIOThread()); |
473 chrome_network_delegate->set_domain_reliability_monitor(monitor); | 473 chrome_network_delegate->set_domain_reliability_monitor(monitor); |
474 } | 474 } |
475 | 475 |
476 ApplyProfileParamsToContext(main_context); | 476 ApplyProfileParamsToContext(main_context); |
477 | 477 |
478 if (http_server_properties_manager_) | 478 if (http_server_properties_manager_) |
479 http_server_properties_manager_->InitializeOnNetworkThread(); | 479 http_server_properties_manager_->InitializeOnNetworkThread(); |
480 | 480 |
481 main_context->set_transport_security_state(transport_security_state()); | 481 main_context->set_transport_security_state(transport_security_state()); // WJM |
482 | 482 |
483 main_context->set_net_log(io_thread->net_log()); | 483 main_context->set_net_log(io_thread->net_log()); |
484 | 484 |
485 network_delegate_ = data_reduction_proxy_io_data()->CreateNetworkDelegate( | 485 network_delegate_ = data_reduction_proxy_io_data()->CreateNetworkDelegate( |
486 chrome_network_delegate.Pass(), true).Pass(); | 486 chrome_network_delegate.Pass(), true).Pass(); |
487 | 487 |
488 main_context->set_network_delegate(network_delegate_.get()); | 488 main_context->set_network_delegate(network_delegate_.get()); // WJM |
489 | 489 |
490 main_context->set_http_server_properties(http_server_properties()); | 490 main_context->set_http_server_properties(http_server_properties()); |
491 | 491 |
492 main_context->set_host_resolver( | 492 main_context->set_host_resolver( |
493 io_thread_globals->host_resolver.get()); | 493 io_thread_globals->host_resolver.get()); // WJM |
494 main_context->set_cert_transparency_verifier( | 494 main_context->set_cert_transparency_verifier( |
495 io_thread_globals->cert_transparency_verifier.get()); | 495 io_thread_globals->cert_transparency_verifier.get()); |
496 main_context->set_http_auth_handler_factory( | 496 main_context->set_http_auth_handler_factory( |
497 io_thread_globals->http_auth_handler_factory.get()); | 497 io_thread_globals->http_auth_handler_factory.get()); // WJM |
498 | 498 |
499 main_context->set_proxy_service(proxy_service()); | 499 main_context->set_proxy_service(proxy_service()); |
500 main_context->set_backoff_manager( | 500 main_context->set_backoff_manager( |
501 io_thread_globals->url_request_backoff_manager.get()); | 501 io_thread_globals->url_request_backoff_manager.get()); |
502 | 502 |
503 scoped_refptr<net::CookieStore> cookie_store = NULL; | 503 scoped_refptr<net::CookieStore> cookie_store = NULL; |
504 net::ChannelIDService* channel_id_service = NULL; | 504 net::ChannelIDService* channel_id_service = NULL; |
505 | 505 |
506 // Set up cookie store. | 506 // Set up cookie store. |
507 if (!cookie_store.get()) { | 507 if (!cookie_store.get()) { |
(...skipping 20 matching lines...) Expand all Loading... |
528 lazy_params_->channel_id_path, | 528 lazy_params_->channel_id_path, |
529 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( | 529 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( |
530 BrowserThread::GetBlockingPool()->GetSequenceToken()), | 530 BrowserThread::GetBlockingPool()->GetSequenceToken()), |
531 lazy_params_->special_storage_policy.get()); | 531 lazy_params_->special_storage_policy.get()); |
532 channel_id_service = new net::ChannelIDService( | 532 channel_id_service = new net::ChannelIDService( |
533 new net::DefaultChannelIDStore(channel_id_db.get()), | 533 new net::DefaultChannelIDStore(channel_id_db.get()), |
534 base::WorkerPool::GetTaskRunner(true)); | 534 base::WorkerPool::GetTaskRunner(true)); |
535 } | 535 } |
536 | 536 |
537 set_channel_id_service(channel_id_service); | 537 set_channel_id_service(channel_id_service); |
538 main_context->set_channel_id_service(channel_id_service); | 538 main_context->set_channel_id_service(channel_id_service); // WJM |
539 | 539 |
540 scoped_ptr<net::HttpCache> main_cache; | 540 scoped_ptr<net::HttpCache> main_cache; |
541 { | 541 { |
542 // TODO(ttuttle): Remove ScopedTracker below once crbug.com/436671 is fixed. | 542 // TODO(ttuttle): Remove ScopedTracker below once crbug.com/436671 is fixed. |
543 tracked_objects::ScopedTracker tracking_profile( | 543 tracked_objects::ScopedTracker tracking_profile( |
544 FROM_HERE_WITH_EXPLICIT_FUNCTION("436671 HttpCache construction")); | 544 FROM_HERE_WITH_EXPLICIT_FUNCTION("436671 HttpCache construction")); |
545 net::HttpCache::DefaultBackend* main_backend = | 545 net::HttpCache::DefaultBackend* main_backend = |
546 new net::HttpCache::DefaultBackend( | 546 new net::HttpCache::DefaultBackend( |
547 net::DISK_CACHE, | 547 net::DISK_CACHE, |
548 ChooseCacheBackendType(), | 548 ChooseCacheBackendType(), |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 const base::Closure& completion) { | 815 const base::Closure& completion) { |
816 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 816 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
817 DCHECK(initialized()); | 817 DCHECK(initialized()); |
818 | 818 |
819 DCHECK(transport_security_state()); | 819 DCHECK(transport_security_state()); |
820 // Completes synchronously. | 820 // Completes synchronously. |
821 transport_security_state()->DeleteAllDynamicDataSince(time); | 821 transport_security_state()->DeleteAllDynamicDataSince(time); |
822 DCHECK(http_server_properties_manager_); | 822 DCHECK(http_server_properties_manager_); |
823 http_server_properties_manager_->Clear(completion); | 823 http_server_properties_manager_->Clear(completion); |
824 } | 824 } |
OLD | NEW |