Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1571)

Issue 2037843002: Remove use of deprecated MessageLoop methods in components. (Closed)

Created:
4 years, 6 months ago by fdoray
Modified:
4 years, 6 months ago
Reviewers:
Cait (Slow)
CC:
chromium-reviews, rjkroege, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, gavinp+disk_chromium.org, mlamouri+watch-screen-orientation_chromium.org, vabr+watchlistpasswordmanager_chromium.org, jam, chirantan+watch_chromium.org, darin-cc_chromium.org, kinuko+cache_chromium.org, mkwst+moarreviews-renderer_chromium.org, gcasto+watchlist_chromium.org, wifiprefetch-reviews_google.com, jochen+watch_chromium.org, mkwst+watchlist-passwords_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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}

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : revert changes to dom_distiller #

Patch Set 4 : revert precache and test_runner #

Patch Set 5 : change dom_distiller #

Patch Set 6 : change precache #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -59 lines) Patch
M components/browsing_data/conditional_cache_deletion_helper.cc View 2 chunks +4 lines, -1 line 0 comments Download
M components/browsing_data/storage_partition_http_cache_data_remover.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M components/browsing_data_ui/history_notice_utils.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M components/dom_distiller/content/browser/distillable_page_utils_android.cc View 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M components/dom_distiller/content/browser/distiller_page_web_contents_browsertest.cc View 3 4 2 chunks +4 lines, -1 line 0 comments Download
M components/dom_distiller/content/browser/dom_distiller_viewer_source.cc View 1 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M components/dom_distiller/core/distiller.cc View 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M components/dom_distiller/core/dom_distiller_service.cc View 3 4 2 chunks +1 line, -2 lines 0 comments Download
M components/dom_distiller/core/task_tracker.cc View 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M components/mus/public/cpp/tests/window_server_test_base.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M components/ownership/owner_settings_service.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M components/pairing/fake_controller_pairing_controller.cc View 4 chunks +10 lines, -12 lines 0 comments Download
M components/pairing/fake_host_pairing_controller.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M components/password_manager/content/browser/credential_manager_impl_unittest.cc View 2 chunks +3 lines, -1 line 0 comments Download
M components/password_manager/content/renderer/credential_manager_client_browsertest.cc View 2 chunks +4 lines, -1 line 0 comments Download
M components/plugins/renderer/webview_plugin.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M components/precache/content/precache_manager_unittest.cc View 1 4 5 1 chunk +2 lines, -1 line 0 comments Download
M components/safe_browsing_db/database_manager_unittest.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M components/safe_json/testing_json_parser.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M components/timers/alarm_timer_unittest.cc View 9 chunks +12 lines, -9 lines 0 comments Download

Messages

Total messages: 26 (14 generated)
fdoray
Can you review this CL? Thanks.
4 years, 6 months ago (2016-06-06 16:40:18 UTC) #2
Cait (Slow)
lgtm
4 years, 6 months ago (2016-06-10 00:10:07 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037843002/1
4 years, 6 months ago (2016-06-10 00:14:00 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/19155) ios-device-gn on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 6 months ago (2016-06-10 00:17:18 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037843002/20001
4 years, 6 months ago (2016-06-10 12:48:04 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/237056)
4 years, 6 months ago (2016-06-10 17:32:14 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037843002/20001
4 years, 6 months ago (2016-06-10 17:52:24 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/237351)
4 years, 6 months ago (2016-06-10 22:26:19 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037843002/20001
4 years, 6 months ago (2016-06-13 14:27:00 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037843002/100001
4 years, 6 months ago (2016-06-15 13:38:48 UTC) #22
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 6 months ago (2016-06-15 16:01:17 UTC) #24
commit-bot: I haz the power
4 years, 6 months ago (2016-06-15 16:04:39 UTC) #26
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/5f59fabf98d3f1a283ff5b13a2baa6f757edc274
Cr-Commit-Position: refs/heads/master@{#399909}

Powered by Google App Engine
This is Rietveld 408576698