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

Unified Diff: ios/crnet/crnet_environment.mm

Issue 1290243007: Shift URLRequestContextStorage over to taking scoped_ptrs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Paul_BuilderGrab
Patch Set: Sync'd to revision p349162. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/gcm/tools/mcs_probe.cc ('k') | ios/web/shell/shell_url_request_context_getter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/crnet/crnet_environment.mm
diff --git a/ios/crnet/crnet_environment.mm b/ios/crnet/crnet_environment.mm
index 3eb873a1f081d1778b2e7c67710d9d22230e8ef6..c8650cb0483aefc12390c79bc7e11c6ccc3d2d3f 100644
--- a/ios/crnet/crnet_environment.mm
+++ b/ios/crnet/crnet_environment.mm
@@ -394,15 +394,22 @@ void CrNetEnvironment::InitializeOnNetworkThread() {
http_server_properties_.reset(new net::HttpServerPropertiesImpl());
main_context_->set_http_server_properties(
http_server_properties_->GetWeakPtr());
+ // TODO(rdsmith): Note that the ".release()" calls below are leaking
+ // the objects in question; this should be fixed by having an object
+ // corresponding to URLRequestContextStorage that actually owns those
+ // objects. See http://crbug.com/523858.
main_context_->set_host_resolver(
net::HostResolver::CreateDefaultResolver(nullptr).release());
- main_context_->set_cert_verifier(net::CertVerifier::CreateDefault());
+ main_context_->set_cert_verifier(
+ net::CertVerifier::CreateDefault().release());
main_context_->set_http_auth_handler_factory(
net::HttpAuthHandlerRegistryFactory::CreateDefault(
- main_context_->host_resolver()));
+ main_context_->host_resolver())
+ .release());
main_context_->set_proxy_service(
net::ProxyService::CreateUsingSystemProxyResolver(
- proxy_config_service_.get(), 0, nullptr));
+ proxy_config_service_.get(), 0, nullptr)
+ .release());
// Cache
NSArray* dirs = NSSearchPathForDirectoriesInDomains(NSCachesDirectory,
« no previous file with comments | « google_apis/gcm/tools/mcs_probe.cc ('k') | ios/web/shell/shell_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698