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

Unified Diff: mojo/services/network/network_context.cc

Issue 1303493002: Make UrlRequestContextBuilder take scoped_ptr's (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync and fix tiny resulting build failure 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/test/usb_test_gadget_impl.cc ('k') | net/tools/get_server_time/get_server_time.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/network/network_context.cc
diff --git a/mojo/services/network/network_context.cc b/mojo/services/network/network_context.cc
index 4e2bf55cb8aa1fcce79e911857cf6c9148cdf99d..3208ad73b48d4dc64feb1c21acc8d59b64208da0 100644
--- a/mojo/services/network/network_context.cc
+++ b/mojo/services/network/network_context.cc
@@ -168,13 +168,12 @@ scoped_ptr<net::URLRequestContext> NetworkContext::MakeURLRequestContext(
new net::MappedHostResolver(host_resolver.Pass()));
remapped_host_resolver->SetRulesFromString(
command_line->GetSwitchValueASCII(kHostResolverRules));
- host_resolver.reset(remapped_host_resolver.release());
- builder.set_host_resolver(host_resolver.release());
+ builder.set_host_resolver(remapped_host_resolver.Pass());
}
builder.set_accept_language("en-us,en");
builder.set_user_agent(mojo::common::GetUserAgent());
- builder.set_proxy_service(net::ProxyService::CreateDirect());
+ builder.set_proxy_service(make_scoped_ptr(net::ProxyService::CreateDirect()));
builder.set_transport_security_persister_path(base_path);
net::URLRequestContextBuilder::HttpCacheParams cache_params;
@@ -210,7 +209,7 @@ scoped_ptr<net::URLRequestContext> NetworkContext::MakeURLRequestContext(
new net::CookieMonster(cookie_store, nullptr), nullptr);
}
- return make_scoped_ptr(builder.Build());
+ return builder.Build().Pass();
}
} // namespace mojo
« no previous file with comments | « device/test/usb_test_gadget_impl.cc ('k') | net/tools/get_server_time/get_server_time.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698