Index: chromecast/browser/url_request_context_factory.cc |
diff --git a/chromecast/browser/url_request_context_factory.cc b/chromecast/browser/url_request_context_factory.cc |
index 808ccba766916cb4e38c14cec2f21085a913dcf9..99013e0849096120e668ae237e9e8f94eb5f00a5 100644 |
--- a/chromecast/browser/url_request_context_factory.cc |
+++ b/chromecast/browser/url_request_context_factory.cc |
@@ -9,6 +9,7 @@ |
#include "base/command_line.h" |
#include "base/files/file_path.h" |
#include "base/macros.h" |
+#include "base/memory/ptr_util.h" |
#include "base/threading/worker_pool.h" |
#include "chromecast/base/chromecast_switches.h" |
#include "chromecast/browser/cast_http_user_agent_settings.h" |
@@ -85,7 +86,7 @@ class URLRequestContextFactory::URLRequestContextGetter |
const bool is_media_; |
URLRequestContextFactory* const factory_; |
- scoped_ptr<net::URLRequestContext> request_context_; |
+ std::unique_ptr<net::URLRequestContext> request_context_; |
DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter); |
}; |
@@ -129,7 +130,7 @@ class URLRequestContextFactory::MainURLRequestContextGetter |
URLRequestContextFactory* const factory_; |
content::ProtocolHandlerMap protocol_handlers_; |
content::URLRequestInterceptorScopedVector request_interceptors_; |
- scoped_ptr<net::URLRequestContext> request_context_; |
+ std::unique_ptr<net::URLRequestContext> request_context_; |
DISALLOW_COPY_AND_ASSIGN(MainURLRequestContextGetter); |
}; |
@@ -226,7 +227,7 @@ void URLRequestContextFactory::InitializeMainContextDependencies( |
return; |
main_transaction_factory_.reset(transaction_factory); |
- scoped_ptr<net::URLRequestJobFactoryImpl> job_factory( |
+ std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory( |
new net::URLRequestJobFactoryImpl()); |
// Keep ProtocolHandlers added in sync with |
// CastContentBrowserClient::IsHandledURL(). |
@@ -235,18 +236,18 @@ void URLRequestContextFactory::InitializeMainContextDependencies( |
it != protocol_handlers->end(); |
++it) { |
set_protocol = job_factory->SetProtocolHandler( |
- it->first, make_scoped_ptr(it->second.release())); |
+ it->first, base::WrapUnique(it->second.release())); |
DCHECK(set_protocol); |
} |
set_protocol = job_factory->SetProtocolHandler( |
- url::kDataScheme, make_scoped_ptr(new net::DataProtocolHandler)); |
+ url::kDataScheme, base::WrapUnique(new net::DataProtocolHandler)); |
DCHECK(set_protocol); |
if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kEnableLocalFileAccesses)) { |
set_protocol = job_factory->SetProtocolHandler( |
url::kFileScheme, |
- make_scoped_ptr(new net::FileProtocolHandler( |
+ base::WrapUnique(new net::FileProtocolHandler( |
content::BrowserThread::GetBlockingPool() |
->GetTaskRunnerWithShutdownBehavior( |
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)))); |
@@ -254,14 +255,14 @@ void URLRequestContextFactory::InitializeMainContextDependencies( |
} |
// Set up interceptors in the reverse order. |
- scoped_ptr<net::URLRequestJobFactory> top_job_factory = |
+ std::unique_ptr<net::URLRequestJobFactory> top_job_factory = |
std::move(job_factory); |
for (content::URLRequestInterceptorScopedVector::reverse_iterator i = |
request_interceptors.rbegin(); |
i != request_interceptors.rend(); |
++i) { |
top_job_factory.reset(new net::URLRequestInterceptingJobFactory( |
- std::move(top_job_factory), make_scoped_ptr(*i))); |
+ std::move(top_job_factory), base::WrapUnique(*i))); |
} |
request_interceptors.weak_clear(); |