scoped_ptr.PassAs is deprecated

This commit is contained in:
Cheng Zhao 2015-01-09 16:02:57 -08:00
parent 02d632c4f7
commit dc01ba5a72

View file

@ -87,8 +87,7 @@ net::URLRequestJobFactory* URLRequestContextGetter::Delegate::CreateURLRequestJo
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
// Set up interceptors in the reverse order. // Set up interceptors in the reverse order.
scoped_ptr<net::URLRequestJobFactory> top_job_factory = scoped_ptr<net::URLRequestJobFactory> top_job_factory = job_factory.Pass();
job_factory.PassAs<net::URLRequestJobFactory>();
content::URLRequestInterceptorScopedVector::reverse_iterator i; content::URLRequestInterceptorScopedVector::reverse_iterator i;
for (i = protocol_interceptors->rbegin(); i != protocol_interceptors->rend(); ++i) for (i = protocol_interceptors->rbegin(); i != protocol_interceptors->rend(); ++i)
top_job_factory.reset(new net::URLRequestInterceptingJobFactory( top_job_factory.reset(new net::URLRequestInterceptingJobFactory(
@ -169,7 +168,7 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
new net::MappedHostResolver(host_resolver.Pass())); new net::MappedHostResolver(host_resolver.Pass()));
remapped_resolver->SetRulesFromString( remapped_resolver->SetRulesFromString(
command_line.GetSwitchValueASCII(switches::kHostResolverRules)); command_line.GetSwitchValueASCII(switches::kHostResolverRules));
host_resolver = remapped_resolver.PassAs<net::HostResolver>(); host_resolver = remapped_resolver.Pass();
} }
// --proxy-server // --proxy-server