diff options
10 files changed, 32 insertions, 34 deletions
diff --git a/blimp/engine/common/blimp_browser_context.cc b/blimp/engine/common/blimp_browser_context.cc index a316d93..4e01d77 100644 --- a/blimp/engine/common/blimp_browser_context.cc +++ b/blimp/engine/common/blimp_browser_context.cc @@ -109,12 +109,10 @@ BlimpBrowserContext::CreateRequestContext( resource_context_->set_url_request_context_getter( new BlimpURLRequestContextGetter( ignore_certificate_errors_, GetPath(), - content::BrowserThread::UnsafeGetMessageLoopForThread( - content::BrowserThread::IO) - ->task_runner(), - content::BrowserThread::UnsafeGetMessageLoopForThread( - content::BrowserThread::FILE) - ->task_runner(), + content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::IO), + content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::FILE), protocol_handlers, std::move(request_interceptors), net_log_)); return resource_context_->url_request_context_getter(); } diff --git a/content/shell/browser/layout_test/layout_test_browser_context.cc b/content/shell/browser/layout_test/layout_test_browser_context.cc index d0dc9d007..ff55d44 100644 --- a/content/shell/browser/layout_test/layout_test_browser_context.cc +++ b/content/shell/browser/layout_test/layout_test_browser_context.cc @@ -96,8 +96,8 @@ LayoutTestBrowserContext::CreateURLRequestContextGetter( "layout-test-mojom", make_linked_ptr(new MojomProtocolHandler))); return new LayoutTestURLRequestContextGetter( ignore_certificate_errors(), GetPath(), - BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), - BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE), + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), protocol_handlers, std::move(request_interceptors), net_log()); } diff --git a/content/shell/browser/layout_test/layout_test_url_request_context_getter.cc b/content/shell/browser/layout_test/layout_test_url_request_context_getter.cc index 4674a58..22c0f16 100644 --- a/content/shell/browser/layout_test/layout_test_url_request_context_getter.cc +++ b/content/shell/browser/layout_test/layout_test_url_request_context_getter.cc @@ -17,15 +17,15 @@ namespace content { LayoutTestURLRequestContextGetter::LayoutTestURLRequestContextGetter( bool ignore_certificate_errors, const base::FilePath& base_path, - base::MessageLoop* io_loop, - base::MessageLoop* file_loop, + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, + scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, ProtocolHandlerMap* protocol_handlers, URLRequestInterceptorScopedVector request_interceptors, net::NetLog* net_log) : ShellURLRequestContextGetter(ignore_certificate_errors, base_path, - io_loop, - file_loop, + io_task_runner, + file_task_runner, protocol_handlers, std::move(request_interceptors), net_log) { diff --git a/content/shell/browser/layout_test/layout_test_url_request_context_getter.h b/content/shell/browser/layout_test/layout_test_url_request_context_getter.h index 7d53886..0f5572c 100644 --- a/content/shell/browser/layout_test/layout_test_url_request_context_getter.h +++ b/content/shell/browser/layout_test/layout_test_url_request_context_getter.h @@ -34,8 +34,8 @@ class LayoutTestURLRequestContextGetter : public ShellURLRequestContextGetter { LayoutTestURLRequestContextGetter( bool ignore_certificate_errors, const base::FilePath& base_path, - base::MessageLoop* io_loop, - base::MessageLoop* file_loop, + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, + scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, ProtocolHandlerMap* protocol_handlers, URLRequestInterceptorScopedVector request_interceptors, net::NetLog* net_log); diff --git a/content/shell/browser/shell_browser_context.cc b/content/shell/browser/shell_browser_context.cc index 0eee3c3..4b01bf9 100644 --- a/content/shell/browser/shell_browser_context.cc +++ b/content/shell/browser/shell_browser_context.cc @@ -133,8 +133,8 @@ ShellBrowserContext::CreateURLRequestContextGetter( URLRequestInterceptorScopedVector request_interceptors) { return new ShellURLRequestContextGetter( ignore_certificate_errors_, GetPath(), - BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), - BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE), + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), protocol_handlers, std::move(request_interceptors), net_log_); } diff --git a/content/shell/browser/shell_url_request_context_getter.cc b/content/shell/browser/shell_url_request_context_getter.cc index 08d19e6..02fd3f1 100644 --- a/content/shell/browser/shell_url_request_context_getter.cc +++ b/content/shell/browser/shell_url_request_context_getter.cc @@ -67,15 +67,15 @@ void InstallProtocolHandlers(net::URLRequestJobFactoryImpl* job_factory, ShellURLRequestContextGetter::ShellURLRequestContextGetter( bool ignore_certificate_errors, const base::FilePath& base_path, - base::MessageLoop* io_loop, - base::MessageLoop* file_loop, + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, + scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, ProtocolHandlerMap* protocol_handlers, URLRequestInterceptorScopedVector request_interceptors, net::NetLog* net_log) : ignore_certificate_errors_(ignore_certificate_errors), base_path_(base_path), - io_loop_(io_loop), - file_loop_(file_loop), + io_task_runner_(io_task_runner), + file_task_runner_(file_task_runner), net_log_(net_log), request_interceptors_(std::move(request_interceptors)) { // Must first be created on the UI thread. @@ -99,8 +99,8 @@ ShellURLRequestContextGetter::CreateNetworkDelegate() { scoped_ptr<net::ProxyConfigService> ShellURLRequestContextGetter::GetProxyConfigService() { - return net::ProxyService::CreateSystemProxyConfigService( - io_loop_->task_runner(), file_loop_->task_runner()); + return net::ProxyService::CreateSystemProxyConfigService(io_task_runner_, + file_task_runner_); } scoped_ptr<net::ProxyService> ShellURLRequestContextGetter::GetProxyService() { diff --git a/content/shell/browser/shell_url_request_context_getter.h b/content/shell/browser/shell_url_request_context_getter.h index db71883..a7fa233b 100644 --- a/content/shell/browser/shell_url_request_context_getter.h +++ b/content/shell/browser/shell_url_request_context_getter.h @@ -36,8 +36,8 @@ class ShellURLRequestContextGetter : public net::URLRequestContextGetter { ShellURLRequestContextGetter( bool ignore_certificate_errors, const base::FilePath& base_path, - base::MessageLoop* io_loop, - base::MessageLoop* file_loop, + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, + scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, ProtocolHandlerMap* protocol_handlers, URLRequestInterceptorScopedVector request_interceptors, net::NetLog* net_log); @@ -61,8 +61,8 @@ class ShellURLRequestContextGetter : public net::URLRequestContextGetter { private: bool ignore_certificate_errors_; base::FilePath base_path_; - base::MessageLoop* io_loop_; - base::MessageLoop* file_loop_; + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; + scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; net::NetLog* net_log_; scoped_ptr<net::ProxyConfigService> proxy_config_service_; diff --git a/extensions/shell/browser/shell_browser_context.cc b/extensions/shell/browser/shell_browser_context.cc index b38661b..fb1d513 100644 --- a/extensions/shell/browser/shell_browser_context.cc +++ b/extensions/shell/browser/shell_browser_context.cc @@ -51,9 +51,9 @@ net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( DCHECK(!url_request_context_getter()); set_url_request_context_getter(new ShellURLRequestContextGetter( this, IgnoreCertificateErrors(), GetPath(), - content::BrowserThread::UnsafeGetMessageLoopForThread( + content::BrowserThread::GetMessageLoopProxyForThread( content::BrowserThread::IO), - content::BrowserThread::UnsafeGetMessageLoopForThread( + content::BrowserThread::GetMessageLoopProxyForThread( content::BrowserThread::FILE), protocol_handlers, std::move(request_interceptors), nullptr /* net_log */, extension_info_map)); diff --git a/extensions/shell/browser/shell_url_request_context_getter.cc b/extensions/shell/browser/shell_url_request_context_getter.cc index 8ee74b2..abd5aed 100644 --- a/extensions/shell/browser/shell_url_request_context_getter.cc +++ b/extensions/shell/browser/shell_url_request_context_getter.cc @@ -17,16 +17,16 @@ ShellURLRequestContextGetter::ShellURLRequestContextGetter( content::BrowserContext* browser_context, bool ignore_certificate_errors, const base::FilePath& base_path, - base::MessageLoop* io_loop, - base::MessageLoop* file_loop, + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, + scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors, net::NetLog* net_log, InfoMap* extension_info_map) : content::ShellURLRequestContextGetter(ignore_certificate_errors, base_path, - io_loop, - file_loop, + io_task_runner, + file_task_runner, protocol_handlers, std::move(request_interceptors), net_log), diff --git a/extensions/shell/browser/shell_url_request_context_getter.h b/extensions/shell/browser/shell_url_request_context_getter.h index 1b6156a..ca678ea 100644 --- a/extensions/shell/browser/shell_url_request_context_getter.h +++ b/extensions/shell/browser/shell_url_request_context_getter.h @@ -33,8 +33,8 @@ class ShellURLRequestContextGetter : content::BrowserContext* browser_context, bool ignore_certificate_errors, const base::FilePath& base_path, - base::MessageLoop* io_loop, - base::MessageLoop* file_loop, + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, + scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors, net::NetLog* net_log, |