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 <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 context->set_cookie_store(globals->system_cookie_store.get()); | 990 context->set_cookie_store(globals->system_cookie_store.get()); |
991 context->set_channel_id_service( | 991 context->set_channel_id_service( |
992 globals->system_channel_id_service.get()); | 992 globals->system_channel_id_service.get()); |
993 context->set_network_delegate(globals->system_network_delegate.get()); | 993 context->set_network_delegate(globals->system_network_delegate.get()); |
994 context->set_http_user_agent_settings( | 994 context->set_http_user_agent_settings( |
995 globals->http_user_agent_settings.get()); | 995 globals->http_user_agent_settings.get()); |
996 context->set_network_quality_estimator( | 996 context->set_network_quality_estimator( |
997 globals->network_quality_estimator.get()); | 997 globals->network_quality_estimator.get()); |
998 context->set_backoff_manager(globals->url_request_backoff_manager.get()); | 998 context->set_backoff_manager(globals->url_request_backoff_manager.get()); |
999 | 999 |
1000 context->set_http_server_properties( | 1000 context->set_http_server_properties(globals->http_server_properties.get()); |
1001 globals->http_server_properties->GetWeakPtr()); | |
1002 | 1001 |
1003 context->set_enable_brotli(globals->enable_brotli); | 1002 context->set_enable_brotli(globals->enable_brotli); |
1004 | 1003 |
1005 net::HttpNetworkSession::Params system_params(params); | 1004 net::HttpNetworkSession::Params system_params(params); |
1006 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents( | 1005 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents( |
1007 context, &system_params); | 1006 context, &system_params); |
1008 | 1007 |
1009 globals->system_http_network_session.reset( | 1008 globals->system_http_network_session.reset( |
1010 new net::HttpNetworkSession(system_params)); | 1009 new net::HttpNetworkSession(system_params)); |
1011 globals->system_http_transaction_factory.reset( | 1010 globals->system_http_transaction_factory.reset( |
(...skipping 29 matching lines...) Expand all Loading... |
1041 | 1040 |
1042 context->set_job_factory( | 1041 context->set_job_factory( |
1043 globals->proxy_script_fetcher_url_request_job_factory.get()); | 1042 globals->proxy_script_fetcher_url_request_job_factory.get()); |
1044 | 1043 |
1045 context->set_cookie_store(globals->system_cookie_store.get()); | 1044 context->set_cookie_store(globals->system_cookie_store.get()); |
1046 context->set_channel_id_service( | 1045 context->set_channel_id_service( |
1047 globals->system_channel_id_service.get()); | 1046 globals->system_channel_id_service.get()); |
1048 context->set_network_delegate(globals->system_network_delegate.get()); | 1047 context->set_network_delegate(globals->system_network_delegate.get()); |
1049 context->set_http_user_agent_settings( | 1048 context->set_http_user_agent_settings( |
1050 globals->http_user_agent_settings.get()); | 1049 globals->http_user_agent_settings.get()); |
1051 context->set_http_server_properties( | 1050 context->set_http_server_properties(globals->http_server_properties.get()); |
1052 globals->http_server_properties->GetWeakPtr()); | |
1053 | 1051 |
1054 context->set_enable_brotli(globals->enable_brotli); | 1052 context->set_enable_brotli(globals->enable_brotli); |
1055 | 1053 |
1056 net::HttpNetworkSession::Params session_params(params); | 1054 net::HttpNetworkSession::Params session_params(params); |
1057 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents( | 1055 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents( |
1058 context, &session_params); | 1056 context, &session_params); |
1059 | 1057 |
1060 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | 1058 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 |
1061 // is fixed. | 1059 // is fixed. |
1062 tracked_objects::ScopedTracker tracking_profile2( | 1060 tracked_objects::ScopedTracker tracking_profile2( |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1101 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
1104 // system URLRequestContext too. There's no reason this should be tied to a | 1102 // system URLRequestContext too. There's no reason this should be tied to a |
1105 // profile. | 1103 // profile. |
1106 return context; | 1104 return context; |
1107 } | 1105 } |
1108 | 1106 |
1109 const metrics::UpdateUsagePrefCallbackType& | 1107 const metrics::UpdateUsagePrefCallbackType& |
1110 IOThread::GetMetricsDataUseForwarder() { | 1108 IOThread::GetMetricsDataUseForwarder() { |
1111 return metrics_data_use_forwarder_; | 1109 return metrics_data_use_forwarder_; |
1112 } | 1110 } |
OLD | NEW |