diff --git a/brightray/browser/browser_context.cc b/brightray/browser/browser_context.cc index bbb2a4e7f9b7..a28fec5d832b 100644 --- a/brightray/browser/browser_context.cc +++ b/brightray/browser/browser_context.cc @@ -140,8 +140,8 @@ net::URLRequestContextGetter* BrowserContext::CreateRequestContext( static_cast(BrowserClient::Get()->GetNetLog()), GetPath(), in_memory_, - BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), - BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), protocol_handlers, std::move(protocol_interceptors)); resource_context_->set_url_request_context_getter(url_request_getter_.get()); diff --git a/brightray/browser/url_request_context_getter.cc b/brightray/browser/url_request_context_getter.cc index 9fc8a721d775..e3e7dca54359 100644 --- a/brightray/browser/url_request_context_getter.cc +++ b/brightray/browser/url_request_context_getter.cc @@ -118,8 +118,8 @@ URLRequestContextGetter::URLRequestContextGetter( NetLog* net_log, const base::FilePath& base_path, bool in_memory, - base::MessageLoop* io_loop, - base::MessageLoop* file_loop, + scoped_refptr io_task_runner, + scoped_refptr file_task_runner, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector protocol_interceptors) : delegate_(delegate), @@ -127,8 +127,8 @@ URLRequestContextGetter::URLRequestContextGetter( net_log_(net_log), base_path_(base_path), in_memory_(in_memory), - io_loop_(io_loop), - file_loop_(file_loop), + io_task_runner_(io_task_runner), + file_task_runner_(file_task_runner), protocol_interceptors_(std::move(protocol_interceptors)), job_factory_(nullptr) { // Must first be created on the UI thread. @@ -144,7 +144,7 @@ URLRequestContextGetter::URLRequestContextGetter( // must synchronously run on the glib message loop. This will be passed to // the URLRequestContextStorage on the IO thread in GetURLRequestContext(). proxy_config_service_ = net::ProxyService::CreateSystemProxyConfigService( - io_loop_->task_runner(), file_loop_->task_runner()); + io_task_runner_, file_task_runner_); } URLRequestContextGetter::~URLRequestContextGetter() { diff --git a/brightray/browser/url_request_context_getter.h b/brightray/browser/url_request_context_getter.h index c4ff58e24261..e08189d862d4 100644 --- a/brightray/browser/url_request_context_getter.h +++ b/brightray/browser/url_request_context_getter.h @@ -67,8 +67,8 @@ class URLRequestContextGetter : public net::URLRequestContextGetter { NetLog* net_log, const base::FilePath& base_path, bool in_memory, - base::MessageLoop* io_loop, - base::MessageLoop* file_loop, + scoped_refptr io_task_runner, + scoped_refptr file_task_runner, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector protocol_interceptors); virtual ~URLRequestContextGetter(); @@ -90,8 +90,8 @@ class URLRequestContextGetter : public net::URLRequestContextGetter { NetLog* net_log_; base::FilePath base_path_; bool in_memory_; - base::MessageLoop* io_loop_; - base::MessageLoop* file_loop_; + scoped_refptr io_task_runner_; + scoped_refptr file_task_runner_; std::string user_agent_;