|
Remove use of deprecated MessageLoop methods in components.
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
R=caitkp@chromium.org
Committed: https://crrev.com/5f59fabf98d3f1a283ff5b13a2baa6f757edc274
Cr-Commit-Position: refs/heads/master@{#399909}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+90 lines, -59 lines) |
Patch |
![](/static/closedtriangle.gif) |
M |
components/browsing_data/conditional_cache_deletion_helper.cc
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/browsing_data/storage_partition_http_cache_data_remover.cc
|
View
|
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/browsing_data_ui/history_notice_utils.cc
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/dom_distiller/content/browser/distillable_page_utils_android.cc
|
View
|
3
4
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/dom_distiller/content/browser/distiller_page_web_contents_browsertest.cc
|
View
|
3
4
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
|
View
|
1
3
4
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/dom_distiller/core/distiller.cc
|
View
|
3
4
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/dom_distiller/core/dom_distiller_service.cc
|
View
|
3
4
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/dom_distiller/core/task_tracker.cc
|
View
|
3
4
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/mus/public/cpp/tests/window_server_test_base.cc
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/ownership/owner_settings_service.cc
|
View
|
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/pairing/fake_controller_pairing_controller.cc
|
View
|
|
4 chunks |
+10 lines, -12 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/pairing/fake_host_pairing_controller.cc
|
View
|
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/password_manager/content/browser/credential_manager_impl_unittest.cc
|
View
|
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/password_manager/content/renderer/credential_manager_client_browsertest.cc
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/plugins/renderer/webview_plugin.cc
|
View
|
1
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/precache/content/precache_manager_unittest.cc
|
View
|
1
4
5
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/safe_browsing_db/database_manager_unittest.cc
|
View
|
1
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/safe_json/testing_json_parser.cc
|
View
|
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
components/timers/alarm_timer_unittest.cc
|
View
|
|
9 chunks |
+12 lines, -9 lines |
0 comments
|
Download
|
Total messages: 26 (14 generated)
|