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

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: 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 | « no previous file | chrome/service/net/service_url_request_context_getter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 446f85af4eeae832a399ecbd88d41f36046b1238..def5f81e4de7ad17a13077ba0fc88162185aa9b4 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());
}
}
@@ -205,9 +205,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
@@ -216,14 +218,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698