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

Unified Diff: android_webview/browser/net/aw_url_request_context_getter.cc

Issue 1303493002: Make UrlRequestContextBuilder take scoped_ptr's (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: android_webview/browser/net/aw_url_request_context_getter.cc
diff --git a/android_webview/browser/net/aw_url_request_context_getter.cc b/android_webview/browser/net/aw_url_request_context_getter.cc
index 68ba6313de665692a51b853d845064f5e1eccbf2..c31a4382af500181b8fdc4c6f83e26baaab27d18 100644
--- a/android_webview/browser/net/aw_url_request_context_getter.cc
+++ b/android_webview/browser/net/aw_url_request_context_getter.cc
@@ -64,7 +64,7 @@ void ApplyCmdlineOverridesToURLRequestContextBuilder(
net::HostResolver::CreateDefaultResolver(NULL)));
host_resolver->SetRulesFromString(
command_line.GetSwitchValueASCII(switches::kHostResolverRules));
- builder->set_host_resolver(host_resolver.release());
+ builder->set_host_resolver(host_resolver.Pass());
}
}
@@ -203,9 +203,11 @@ void AwURLRequestContextGetter::InitializeURLRequestContext() {
DCHECK(browser_context);
builder.set_network_delegate(
- browser_context->GetDataReductionProxyIOData()->CreateNetworkDelegate(
- aw_network_delegate.Pass(),
- false /* No UMA is produced to track bypasses. */ ).release());
+ browser_context->GetDataReductionProxyIOData()
+ ->CreateNetworkDelegate(
+ aw_network_delegate.Pass(),
+ false /* No UMA is produced to track bypasses. */)
+ .Pass());
#if !defined(DISABLE_FTP_SUPPORT)
builder.set_ftp_enabled(false); // Android WebView does not support ftp yet.
#endif
@@ -214,14 +216,13 @@ void AwURLRequestContextGetter::InitializeURLRequestContext() {
// Create the proxy without a resolver since we rely on this local HTTP proxy.
// TODO(sgurun) is this behavior guaranteed through SDK?
builder.set_proxy_service(
- net::ProxyService::CreateWithoutProxyResolver(
- proxy_config_service_.release(),
- net_log_.get()));
+ make_scoped_ptr(net::ProxyService::CreateWithoutProxyResolver(
+ proxy_config_service_.release(), net_log_.get())));
builder.set_net_log(net_log_.get());
builder.SetCookieAndChannelIdStores(cookie_store_, NULL);
ApplyCmdlineOverridesToURLRequestContextBuilder(&builder);
- url_request_context_.reset(builder.Build());
+ url_request_context_ = builder.Build().Pass();
// TODO(mnaganov): Fix URLRequestContextBuilder to use proper threads.
net::HttpNetworkSession::Params network_session_params;
« no previous file with comments | « no previous file | chrome/service/net/service_url_request_context_getter.cc » ('j') | device/test/usb_test_gadget_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698