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

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

Issue 1290243007: Shift URLRequestContextStorage over to taking scoped_ptrs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Paul_BuilderGrab
Patch Set: Lots of fixes driven by try jobs. Created 5 years, 4 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
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 <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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 "466432 IOThread::InitAsync::CertPolicyEnforcer")); 741 "466432 IOThread::InitAsync::CertPolicyEnforcer"));
742 net::CertPolicyEnforcer* policy_enforcer = new net::CertPolicyEnforcer; 742 net::CertPolicyEnforcer* policy_enforcer = new net::CertPolicyEnforcer;
743 globals_->cert_policy_enforcer.reset(policy_enforcer); 743 globals_->cert_policy_enforcer.reset(policy_enforcer);
744 744
745 globals_->ssl_config_service = GetSSLConfigService(); 745 globals_->ssl_config_service = GetSSLConfigService();
746 746
747 globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory( 747 globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory(
748 globals_->host_resolver.get())); 748 globals_->host_resolver.get()));
749 globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl()); 749 globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl());
750 // For the ProxyScriptFetcher, we use a direct ProxyService. 750 // For the ProxyScriptFetcher, we use a direct ProxyService.
751 globals_->proxy_script_fetcher_proxy_service.reset( 751 globals_->proxy_script_fetcher_proxy_service =
752 net::ProxyService::CreateDirectWithNetLog(net_log_)); 752 net::ProxyService::CreateDirectWithNetLog(net_log_);
753 // In-memory cookie store. 753 // In-memory cookie store.
754 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 754 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432
755 // is fixed. 755 // is fixed.
756 tracked_objects::ScopedTracker tracking_profile11( 756 tracked_objects::ScopedTracker tracking_profile11(
757 FROM_HERE_WITH_EXPLICIT_FUNCTION( 757 FROM_HERE_WITH_EXPLICIT_FUNCTION(
758 "466432 IOThread::InitAsync::CreateCookieStore::Start")); 758 "466432 IOThread::InitAsync::CreateCookieStore::Start"));
759 globals_->system_cookie_store = 759 globals_->system_cookie_store =
760 content::CreateCookieStore(content::CookieStoreConfig()); 760 content::CreateCookieStore(content::CookieStoreConfig());
761 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 761 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432
762 // is fixed. 762 // is fixed.
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 base::Unretained(this))); 1214 base::Unretained(this)));
1215 } 1215 }
1216 1216
1217 void IOThread::InitSystemRequestContextOnIOThread() { 1217 void IOThread::InitSystemRequestContextOnIOThread() {
1218 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 1218 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
1219 DCHECK(!globals_->system_proxy_service.get()); 1219 DCHECK(!globals_->system_proxy_service.get());
1220 DCHECK(system_proxy_config_service_.get()); 1220 DCHECK(system_proxy_config_service_.get());
1221 1221
1222 const base::CommandLine& command_line = 1222 const base::CommandLine& command_line =
1223 *base::CommandLine::ForCurrentProcess(); 1223 *base::CommandLine::ForCurrentProcess();
1224 globals_->system_proxy_service.reset( 1224 globals_->system_proxy_service = ProxyServiceFactory::CreateProxyService(
1225 ProxyServiceFactory::CreateProxyService( 1225 net_log_, globals_->proxy_script_fetcher_context.get(),
1226 net_log_, 1226 globals_->system_network_delegate.get(),
1227 globals_->proxy_script_fetcher_context.get(), 1227 system_proxy_config_service_.release(), command_line,
1228 globals_->system_network_delegate.get(), 1228 quick_check_enabled_.GetValue());
1229 system_proxy_config_service_.release(),
1230 command_line,
1231 quick_check_enabled_.GetValue()));
1232 1229
1233 net::HttpNetworkSession::Params system_params; 1230 net::HttpNetworkSession::Params system_params;
1234 InitializeNetworkSessionParams(&system_params); 1231 InitializeNetworkSessionParams(&system_params);
1235 system_params.net_log = net_log_; 1232 system_params.net_log = net_log_;
1236 system_params.proxy_service = globals_->system_proxy_service.get(); 1233 system_params.proxy_service = globals_->system_proxy_service.get();
1237 1234
1238 globals_->system_http_transaction_factory.reset( 1235 globals_->system_http_transaction_factory.reset(
1239 new net::HttpNetworkLayer( 1236 new net::HttpNetworkLayer(
1240 new net::HttpNetworkSession(system_params))); 1237 new net::HttpNetworkSession(system_params)));
1241 globals_->system_url_request_job_factory.reset( 1238 globals_->system_url_request_job_factory.reset(
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); 1599 net::QuicVersionVector supported_versions = net::QuicSupportedVersions();
1603 for (size_t i = 0; i < supported_versions.size(); ++i) { 1600 for (size_t i = 0; i < supported_versions.size(); ++i) {
1604 net::QuicVersion version = supported_versions[i]; 1601 net::QuicVersion version = supported_versions[i];
1605 if (net::QuicVersionToString(version) == quic_version) { 1602 if (net::QuicVersionToString(version) == quic_version) {
1606 return version; 1603 return version;
1607 } 1604 }
1608 } 1605 }
1609 1606
1610 return net::QUIC_VERSION_UNSUPPORTED; 1607 return net::QUIC_VERSION_UNSUPPORTED;
1611 } 1608 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698