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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 2906463002: Make HttpNetworkSession::host_mapping_rules no longer a pointer. (Closed)
Patch Set: Oops Created 3 years, 6 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 | « no previous file | google_apis/gcm/tools/mcs_probe.cc » ('j') | net/base/host_mapping_rules.cc » ('J')
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 "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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 637
638 globals_->ssl_config_service = GetSSLConfigService(); 638 globals_->ssl_config_service = GetSSLConfigService();
639 639
640 CreateDefaultAuthHandlerFactory(); 640 CreateDefaultAuthHandlerFactory();
641 globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl()); 641 globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl());
642 // For the ProxyScriptFetcher, we use a direct ProxyService. 642 // For the ProxyScriptFetcher, we use a direct ProxyService.
643 globals_->proxy_script_fetcher_proxy_service = 643 globals_->proxy_script_fetcher_proxy_service =
644 net::ProxyService::CreateDirectWithNetLog(net_log_); 644 net::ProxyService::CreateDirectWithNetLog(net_log_);
645 globals_->dns_probe_service.reset(new chrome_browser_net::DnsProbeService()); 645 globals_->dns_probe_service.reset(new chrome_browser_net::DnsProbeService());
646 globals_->host_mapping_rules.reset(new net::HostMappingRules()); 646 globals_->host_mapping_rules.reset(new net::HostMappingRules());
647 params_.host_mapping_rules = globals_->host_mapping_rules.get();
648 globals_->http_user_agent_settings.reset(
649 new net::StaticHttpUserAgentSettings(std::string(), GetUserAgent()));
Randy Smith (Not in Mondays) 2017/05/25 17:50:48 Why move this line? (I don't care, I'm just worri
mmenke 2017/05/25 18:07:10 Purely for code hygiene resions. It's weird to ha
Randy Smith (Not in Mondays) 2017/05/25 18:17:06 Understood; that's fine. (I understood moving th
650 if (command_line.HasSwitch(switches::kHostRules)) { 647 if (command_line.HasSwitch(switches::kHostRules)) {
651 TRACE_EVENT_BEGIN0("startup", "IOThread::InitAsync:SetRulesFromString"); 648 TRACE_EVENT_BEGIN0("startup", "IOThread::InitAsync:SetRulesFromString");
652 globals_->host_mapping_rules->SetRulesFromString( 649 globals_->host_mapping_rules->SetRulesFromString(
653 command_line.GetSwitchValueASCII(switches::kHostRules)); 650 command_line.GetSwitchValueASCII(switches::kHostRules));
654 TRACE_EVENT_END0("startup", "IOThread::InitAsync:SetRulesFromString"); 651 TRACE_EVENT_END0("startup", "IOThread::InitAsync:SetRulesFromString");
655 } 652 }
653 params_.host_mapping_rules = *globals_->host_mapping_rules.get();
654 globals_->http_user_agent_settings.reset(
655 new net::StaticHttpUserAgentSettings(std::string(), GetUserAgent()));
656 globals_->enable_brotli = 656 globals_->enable_brotli =
657 base::FeatureList::IsEnabled(features::kBrotliEncoding); 657 base::FeatureList::IsEnabled(features::kBrotliEncoding);
658 params_.enable_token_binding = 658 params_.enable_token_binding =
659 base::FeatureList::IsEnabled(features::kTokenBinding); 659 base::FeatureList::IsEnabled(features::kTokenBinding);
660 660
661 // Check for OS support of TCP FastOpen, and turn it on for all connections if 661 // Check for OS support of TCP FastOpen, and turn it on for all connections if
662 // indicated by user. 662 // indicated by user.
663 // TODO(rch): Make the client socket factory a per-network session instance, 663 // TODO(rch): Make the client socket factory a per-network session instance,
664 // constructed from a NetworkSession::Params, to allow us to move this option 664 // constructed from a NetworkSession::Params, to allow us to move this option
665 // to IOThread::Globals & HttpNetworkSession::Params. 665 // to IOThread::Globals & HttpNetworkSession::Params.
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 1094
1095 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the 1095 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the
1096 // system URLRequestContext too. There's no reason this should be tied to a 1096 // system URLRequestContext too. There's no reason this should be tied to a
1097 // profile. 1097 // profile.
1098 return context; 1098 return context;
1099 } 1099 }
1100 1100
1101 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() { 1101 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() {
1102 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread); 1102 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread);
1103 } 1103 }
OLDNEW
« no previous file with comments | « no previous file | google_apis/gcm/tools/mcs_probe.cc » ('j') | net/base/host_mapping_rules.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698