| 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 12 matching lines...) Expand all Loading... |
| 23 #include "base/strings/string_piece.h" | 23 #include "base/strings/string_piece.h" |
| 24 #include "base/strings/string_split.h" | 24 #include "base/strings/string_split.h" |
| 25 #include "base/strings/string_util.h" | 25 #include "base/strings/string_util.h" |
| 26 #include "base/threading/sequenced_worker_pool.h" | 26 #include "base/threading/sequenced_worker_pool.h" |
| 27 #include "base/threading/thread.h" | 27 #include "base/threading/thread.h" |
| 28 #include "base/threading/worker_pool.h" | 28 #include "base/threading/worker_pool.h" |
| 29 #include "base/time/time.h" | 29 #include "base/time/time.h" |
| 30 #include "base/trace_event/trace_event.h" | 30 #include "base/trace_event/trace_event.h" |
| 31 #include "build/build_config.h" | 31 #include "build/build_config.h" |
| 32 #include "chrome/browser/browser_process.h" | 32 #include "chrome/browser/browser_process.h" |
| 33 #include "chrome/browser/data_usage/tab_id_annotator.h" |
| 33 #include "chrome/browser/net/async_dns_field_trial.h" | 34 #include "chrome/browser/net/async_dns_field_trial.h" |
| 34 #include "chrome/browser/net/chrome_network_delegate.h" | 35 #include "chrome/browser/net/chrome_network_delegate.h" |
| 35 #include "chrome/browser/net/connect_interceptor.h" | 36 #include "chrome/browser/net/connect_interceptor.h" |
| 36 #include "chrome/browser/net/dns_probe_service.h" | 37 #include "chrome/browser/net/dns_probe_service.h" |
| 37 #include "chrome/browser/net/proxy_service_factory.h" | 38 #include "chrome/browser/net/proxy_service_factory.h" |
| 38 #include "chrome/common/channel_info.h" | 39 #include "chrome/common/channel_info.h" |
| 39 #include "chrome/common/chrome_content_client.h" | 40 #include "chrome/common/chrome_content_client.h" |
| 40 #include "chrome/common/chrome_switches.h" | 41 #include "chrome/common/chrome_switches.h" |
| 41 #include "chrome/common/pref_names.h" | 42 #include "chrome/common/pref_names.h" |
| 42 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref
s.h" | 43 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref
s.h" |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 new LoggingNetworkChangeObserver(net_log_)); | 599 new LoggingNetworkChangeObserver(net_log_)); |
| 599 | 600 |
| 600 // Setup the HistogramWatcher to run on the IO thread. | 601 // Setup the HistogramWatcher to run on the IO thread. |
| 601 net::NetworkChangeNotifier::InitHistogramWatcher(); | 602 net::NetworkChangeNotifier::InitHistogramWatcher(); |
| 602 | 603 |
| 603 #if defined(ENABLE_EXTENSIONS) | 604 #if defined(ENABLE_EXTENSIONS) |
| 604 globals_->extension_event_router_forwarder = | 605 globals_->extension_event_router_forwarder = |
| 605 extension_event_router_forwarder_; | 606 extension_event_router_forwarder_; |
| 606 #endif | 607 #endif |
| 607 | 608 |
| 608 data_use_aggregator_.reset(new data_usage::DataUseAggregator()); | 609 data_use_aggregator_.reset(new data_usage::DataUseAggregator( |
| 610 scoped_ptr<data_usage::DataUseAnnotator>( |
| 611 new chrome_browser_data_usage::TabIdAnnotator()))); |
| 609 | 612 |
| 610 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | 613 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 |
| 611 // is fixed. | 614 // is fixed. |
| 612 tracked_objects::ScopedTracker tracking_profile3( | 615 tracked_objects::ScopedTracker tracking_profile3( |
| 613 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 616 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 614 "466432 IOThread::InitAsync::ChromeNetworkDelegate")); | 617 "466432 IOThread::InitAsync::ChromeNetworkDelegate")); |
| 615 scoped_ptr<ChromeNetworkDelegate> chrome_network_delegate( | 618 scoped_ptr<ChromeNetworkDelegate> chrome_network_delegate( |
| 616 new ChromeNetworkDelegate(extension_event_router_forwarder(), | 619 new ChromeNetworkDelegate(extension_event_router_forwarder(), |
| 617 &system_enable_referrers_)); | 620 &system_enable_referrers_)); |
| 618 // By default, data usage is considered off the record. | 621 // By default, data usage is considered off the record. |
| (...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1654 globals->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); | 1657 globals->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); |
| 1655 | 1658 |
| 1656 context->set_job_factory( | 1659 context->set_job_factory( |
| 1657 globals->proxy_script_fetcher_url_request_job_factory.get()); | 1660 globals->proxy_script_fetcher_url_request_job_factory.get()); |
| 1658 | 1661 |
| 1659 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1662 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
| 1660 // system URLRequestContext too. There's no reason this should be tied to a | 1663 // system URLRequestContext too. There's no reason this should be tied to a |
| 1661 // profile. | 1664 // profile. |
| 1662 return context; | 1665 return context; |
| 1663 } | 1666 } |
| OLD | NEW |