|
Remove use of deprecated MessageLoop methods in content.
MessageLoop::PostTask/PostDelayedTask/DeleteSoon/ReleaseSoon
are deprecated. This CL makes the following replacements to
remove some uses of these methods:
"MessageLoop::current()->PostTask" ->
"ThreadTaskRunnerHandle::Get()->PostTask"
"MessageLoop::current()->PostDelayedTask" ->
"ThreadTaskRunnerHandle::Get()->PostDelayedTask"
"MessageLoop::current()->DeleteSoon" ->
"ThreadTaskRunnerHandle::Get()->DeleteSoon"
"MessageLoop::current()->ReleaseSoon" ->
"ThreadTaskRunnerHandle::Get()->ReleaseSoon"
In files where these replacements are made, it adds these includes:
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
And removes this include if it is no longer required:
#include "base/message_loop/message_loop.h"
Why ThreadTaskRunnerHandle::Get() instead of
MessageLoop::current()->task_runner()?
- The two are equivalent on threads that run a MessageLoop.
- MessageLoop::current() doesn't work in base/task_scheduler
because the scheduler's thread don't run MessageLoops.
This CL will therefore facilitate the migration of browser
threads to base/task_scheduler.
Steps to generate this patch:
1. Run message_loop_cleanup.py (see code on the bug).
2. Run tools/sort-headers.py on modified files.
3. Run git cl format.
BUG= 616447
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation
Committed: https://crrev.com/7a8954a41c5f5a93c4b4640a404b0dacc88be173
Cr-Commit-Position: refs/heads/master@{#398224}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+108 lines, -52 lines) |
Patch |
 |
M |
content/browser/appcache/appcache_update_job.cc
|
View
|
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
|
View
|
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/fileapi/file_system_url_request_job_unittest.cc
|
View
|
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/frame_host/render_widget_host_view_child_frame.cc
|
View
|
1
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/loader/mime_type_resource_handler_unittest.cc
|
View
|
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/media/session/media_session_delegate_android_browsertest.cc
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/media/session/media_session_visibility_browsertest.cc
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_process_host_impl.cc
|
View
|
1
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_widget_host_impl.cc
|
View
|
1
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_widget_host_view_android.cc
|
View
|
1
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
|
View
|
1
|
5 chunks |
+7 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/websocket_blob_sender_unittest.cc
|
View
|
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/service_worker/service_worker_client_utils.cc
|
View
|
1
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/tracing/background_tracing_manager_impl.cc
|
View
|
1
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/public/test/mock_render_process_host.cc
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/public/test/test_download_request_handler.cc
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/android/synchronous_compositor_output_surface.cc
|
View
|
1
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/browser_plugin/browser_plugin.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/image_downloader/image_downloader_impl.cc
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/html_video_element_capturer_source.cc
|
View
|
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/media/renderer_webmediaplayer_delegate_browsertest.cc
|
View
|
1
|
5 chunks |
+11 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
View
|
1
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/pepper_media_device_manager.cc
|
View
|
|
2 chunks |
+6 lines, -11 lines |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/pepper_webplugin_impl.cc
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/plugin_power_saver_helper.cc
|
View
|
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/renderer/render_view_impl.cc
|
View
|
1
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/shell/browser/shell_mojo_test_utils_android.cc
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
Total messages: 13 (8 generated)
|