| 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/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 #if defined(ENABLE_EXTENSIONS) | 101 #if defined(ENABLE_EXTENSIONS) |
| 102 #include "chrome/browser/extensions/event_router_forwarder.h" | 102 #include "chrome/browser/extensions/event_router_forwarder.h" |
| 103 #endif | 103 #endif |
| 104 | 104 |
| 105 #if defined(USE_NSS_CERTS) || defined(OS_IOS) | 105 #if defined(USE_NSS_CERTS) || defined(OS_IOS) |
| 106 #include "net/cert_net/nss_ocsp.h" | 106 #include "net/cert_net/nss_ocsp.h" |
| 107 #endif | 107 #endif |
| 108 | 108 |
| 109 #if defined(OS_ANDROID) | 109 #if defined(OS_ANDROID) |
| 110 #include "base/android/build_info.h" | 110 #include "base/android/build_info.h" |
| 111 #include "chrome/browser/android/datausage/external_data_use_observer_android.h" |
| 111 #include "chrome/browser/android/net/external_estimate_provider_android.h" | 112 #include "chrome/browser/android/net/external_estimate_provider_android.h" |
| 112 #endif | 113 #endif |
| 113 | 114 |
| 114 #if defined(OS_CHROMEOS) | 115 #if defined(OS_CHROMEOS) |
| 115 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" | 116 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" |
| 116 #include "chromeos/network/host_resolver_impl_chromeos.h" | 117 #include "chromeos/network/host_resolver_impl_chromeos.h" |
| 117 #endif | 118 #endif |
| 118 | 119 |
| 119 using content::BrowserThread; | 120 using content::BrowserThread; |
| 120 | 121 |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 577 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 577 "466432 IOThread::InitAsync::ChromeNetworkDelegate")); | 578 "466432 IOThread::InitAsync::ChromeNetworkDelegate")); |
| 578 scoped_ptr<ChromeNetworkDelegate> chrome_network_delegate( | 579 scoped_ptr<ChromeNetworkDelegate> chrome_network_delegate( |
| 579 new ChromeNetworkDelegate(extension_event_router_forwarder(), | 580 new ChromeNetworkDelegate(extension_event_router_forwarder(), |
| 580 &system_enable_referrers_)); | 581 &system_enable_referrers_)); |
| 581 // By default, data usage is considered off the record. | 582 // By default, data usage is considered off the record. |
| 582 chrome_network_delegate->set_data_use_aggregator( | 583 chrome_network_delegate->set_data_use_aggregator( |
| 583 globals_->data_use_aggregator.get(), | 584 globals_->data_use_aggregator.get(), |
| 584 true /* is_data_usage_off_the_record */); | 585 true /* is_data_usage_off_the_record */); |
| 585 | 586 |
| 587 #if defined(OS_ANDROID) |
| 588 scoped_ptr<data_usage::DataUseAggregator::Observer> |
| 589 external_data_use_observer( |
| 590 new chrome::android::ExternalDataUseObserverAndroid( |
| 591 globals_->data_use_aggregator.get())); |
| 592 |
| 593 globals_->data_use_aggregator->PassExternalObserver( |
| 594 external_data_use_observer.Pass()); |
| 595 #endif |
| 596 |
| 586 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | 597 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 |
| 587 // is fixed. | 598 // is fixed. |
| 588 tracked_objects::ScopedTracker tracking_profile4( | 599 tracked_objects::ScopedTracker tracking_profile4( |
| 589 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 600 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 590 "466432 IOThread::InitAsync::CreateGlobalHostResolver")); | 601 "466432 IOThread::InitAsync::CreateGlobalHostResolver")); |
| 591 globals_->system_network_delegate = chrome_network_delegate.Pass(); | 602 globals_->system_network_delegate = chrome_network_delegate.Pass(); |
| 592 globals_->host_resolver = CreateGlobalHostResolver(net_log_); | 603 globals_->host_resolver = CreateGlobalHostResolver(net_log_); |
| 593 | 604 |
| 594 std::map<std::string, std::string> network_quality_estimator_params; | 605 std::map<std::string, std::string> network_quality_estimator_params; |
| 595 variations::GetVariationParams(kNetworkQualityEstimatorFieldTrialName, | 606 variations::GetVariationParams(kNetworkQualityEstimatorFieldTrialName, |
| (...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1590 globals->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); | 1601 globals->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); |
| 1591 | 1602 |
| 1592 context->set_job_factory( | 1603 context->set_job_factory( |
| 1593 globals->proxy_script_fetcher_url_request_job_factory.get()); | 1604 globals->proxy_script_fetcher_url_request_job_factory.get()); |
| 1594 | 1605 |
| 1595 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1606 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
| 1596 // system URLRequestContext too. There's no reason this should be tied to a | 1607 // system URLRequestContext too. There's no reason this should be tied to a |
| 1597 // profile. | 1608 // profile. |
| 1598 return context; | 1609 return context; |
| 1599 } | 1610 } |
| OLD | NEW |