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

Issue 2033753002: Remove use of deprecated MessageLoop methods in chrome/. (Closed)

Created:
4 years, 6 months ago by fdoray
Modified:
4 years, 6 months ago
Reviewers:
Nico, dcheng
CC:
achuith+watch_chromium.org, asanka, asvitkine+watch_chromium.org, browser-components-watch_chromium.org, cbentzel+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, davemoore+watch_chromium.org, dbeam+watch-options_chromium.org, David Black, dhollowa+watch_chromium.org, dkrahn+watch_chromium.org, donnd+watch_chromium.org, dougw+watch_chromium.org, dzhioev+watch_chromium.org, extensions-reviews_chromium.org, gcasto+watchlist_chromium.org, groby+spellwatch_chromium.org, grt+watch_chromium.org, Jered, jfweitz+watch_chromium.org, kalyank, kmadhusu+watch_chromium.org, markusheintz_, media-router+watch_chromium.org, melevin+watch_chromium.org, Matt Giuca, michaelpg+watch-options_chromium.org, mkwst+watchlist-passwords_chromium.org, msramek+watch_chromium.org, noyau+watch_chromium.org, oshima+watch_chromium.org, rginda+watch_chromium.org, rlp+watch_chromium.org, rouslan+spell_chromium.org, sadrul, samarth+watch_chromium.org, skanuj+watch_chromium.org, stevenjb+watch_chromium.org, tapted, tfarina, vabr+watchlistpasswordmanager_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 chrome/. MessageLoop::PostTask/PostDelayedTask/DeleteSoon/ReleaseSoon are deprecated. This CL makes the following replacements to remove some uses of these methods: "MessageLoop(ForUI|ForIO)::current()->PostTask" -> "ThreadTaskRunnerHandle::Get()->PostTask" "MessageLoop(ForUI|ForIO)::current()->PostDelayedTask" -> "ThreadTaskRunnerHandle::Get()->PostDelayedTask" "MessageLoop(ForUI|ForIO)::current()->DeleteSoon" -> "ThreadTaskRunnerHandle::Get()->DeleteSoon" "MessageLoop(ForUI|ForIO)::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 this CL's comments). 2. Run tools/sort-headers.py on modified files. 3. Run git cl format. BUG=616447 Committed: https://crrev.com/283082bd73d2873a5bafefcda09e0f182100e77f Cr-Commit-Position: refs/heads/master@{#397497}

Patch Set 1 #

Patch Set 2 : manual change #

Patch Set 3 : manual change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+472 lines, -294 lines) Patch
M chrome/browser/android/download/download_manager_service.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/android/feedback/connectivity_checker.cc View 4 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/apps/app_launch_for_metro_restart_win.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/apps/app_shim/app_shim_handler_mac.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/background/background_contents_service.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_html_writer.cc View 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_unittest.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/app_mode/app_session.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/app_mode/kiosk_profile_loader.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/attestation/attestation_policy_browsertest.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/attestation/attestation_policy_observer_unittest.cc View 3 chunks +11 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc View 3 chunks +12 lines, -17 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_manager/private_api_util.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/first_run/drive_first_run_controller.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/first_run/first_run_controller.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/first_run/goodies_displayer.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/app_launch_controller.cc View 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/login/easy_unlock/easy_unlock_reauth.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/enable_debugging_browsertest.cc View 4 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/lock/screen_locker.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/login/login_browsertest.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/login_ui_keyboard_browsertest.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/oobe_browsertest.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/profile_auth_data.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/screens/chrome_user_selection_screen.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/screens/update_screen.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/session/user_session_manager.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/signin/merge_session_xhr_request_waiter.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/test/oobe_base_test.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/login/test/wizard_in_process_browser_test.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/ui/captive_portal_window_browsertest.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/ui/login_display_host_impl.cc View 3 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/login/user_flow.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/login/wizard_controller.cc View 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/net/client_cert_store_chromeos_unittest.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/net/network_portal_detector_impl.cc View 3 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/net/network_portal_detector_impl_browsertest.cc View 1 3 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/policy/consumer_enrollment_handler.cc View 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/policy/device_local_account_browsertest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/policy/device_system_use_24hour_clock_browsertest.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/policy/display_rotation_default_handler_browsertest.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc View 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/policy/enterprise_install_attributes.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/policy/login_screen_default_policy_browsertest.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/policy/power_policy_browsertest.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/settings/device_oauth2_token_service.cc View 2 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/settings/device_settings_service.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/shutdown_policy_browsertest.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/dom_distiller/tab_utils.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/download/chrome_download_manager_delegate_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/download/notification/download_notification_manager.cc View 4 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/gcd_private/privet_v3_context_getter_unittest.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/identity/web_auth_flow.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/test_utils.cc View 3 chunks +13 lines, -8 lines 0 comments Download
M chrome/browser/extensions/api/networking_config_chromeos_apitest_chromeos.cc View 1 2 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_action_runner.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_disabled_ui.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_install_prompt.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/external_install_error.cc View 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/local_discovery/service_discovery_device_lister.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/metrics/google_update_metrics_provider_win.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/metrics/thread_watcher.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/net/load_timing_browsertest.cc View 3 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/password_manager/password_store_win_unittest.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/printing/background_printing_manager.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/printing/cloud_print/privet_http_unittest.cc View 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/printing/print_job.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/printing/printing_layout_browsertest.cc View 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_window.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/client_side_model_loader.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/download_protection_service_unittest.cc View 5 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/sessions/session_restore.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/media_delegate_chromeos.cc View 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/search/instant_controller.cc View 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/ui/views/app_list/win/app_list_service_win.cc View 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/views/certificate_viewer_win.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/chrome_views_delegate.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/exclusive_access_bubble_views.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/keyboard_access_browsertest.cc View 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/new_back_shortcut_bubble.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/select_file_dialog_extension.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc View 4 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc View 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/settings_utils_win.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/service/cloud_print/printer_job_handler_unittest.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/test/media_router/media_router_base_browsertest.cc View 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/utility/importer/firefox_importer_unittest_utils_mac.cc View 2 chunks +5 lines, -3 lines 0 comments Download

Messages

Total messages: 31 (13 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2033753002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2033753002/1
4 years, 6 months ago (2016-06-02 14:27:35 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_compile_dbg_ng/builds/210165)
4 years, 6 months ago (2016-06-02 14:46:34 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2033753002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2033753002/20001
4 years, 6 months ago (2016-06-02 14:55:39 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_compile_dbg_ng/builds/210181) linux_chromium_chromeos_rel_ng on ...
4 years, 6 months ago (2016-06-02 15:15:34 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2033753002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2033753002/40001
4 years, 6 months ago (2016-06-02 15:19:57 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-02 16:43:06 UTC) #12
fdoray
message_loop_cleanup.py: import os import re LOCATION_HEADER = 'base/location.h' THREAD_TASK_RUNNER_HANDLER_HEADER = 'base/threading/thread_task_runner_handle.h' SINGLE_THREAD_TASK_RUNNER_HEADER = 'base/single_thread_task_runner.h' # ...
4 years, 6 months ago (2016-06-02 16:47:48 UTC) #13
fdoray
Can you review this CL? Thanks.
4 years, 6 months ago (2016-06-02 16:48:31 UTC) #16
Nico
https://code.google.com/p/chromium/codesearch#chromium/src/base/message_loop/message_loop.h&q=message_loop.h&sq=package:chromium&type=cs&l=5 doesn't say anything about ::current() being deprecated from what I can tell. What's the ...
4 years, 6 months ago (2016-06-02 18:09:24 UTC) #17
fdoray
On 2016/06/02 18:09:24, Nico wrote: > https://code.google.com/p/chromium/codesearch#chromium/src/base/message_loop/message_loop.h&q=message_loop.h&sq=package:chromium&type=cs&l=5 > doesn't say anything about ::current() being deprecated ...
4 years, 6 months ago (2016-06-02 19:01:53 UTC) #18
Nico
Can you add some of that either to the cl description or the linked bug? ...
4 years, 6 months ago (2016-06-02 19:25:14 UTC) #19
fdoray
On 2016/06/02 19:25:14, Nico wrote: > Can you add some of that either to the ...
4 years, 6 months ago (2016-06-02 20:09:09 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2033753002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2033753002/40001
4 years, 6 months ago (2016-06-02 20:10:06 UTC) #23
dcheng
Shouldn't there be some sort of PSA about these changes?
4 years, 6 months ago (2016-06-02 20:15:02 UTC) #25
fdoray
On 2016/06/02 20:15:02, dcheng wrote: > Shouldn't there be some sort of PSA about these ...
4 years, 6 months ago (2016-06-02 20:16:52 UTC) #26
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 6 months ago (2016-06-02 20:19:03 UTC) #28
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/283082bd73d2873a5bafefcda09e0f182100e77f Cr-Commit-Position: refs/heads/master@{#397497}
4 years, 6 months ago (2016-06-02 20:20:22 UTC) #30
dcheng
4 years, 6 months ago (2016-06-02 20:36:05 UTC) #31
Message was sent while issue was closed.
On 2016/06/02 at 20:16:52, fdoray wrote:
> On 2016/06/02 20:15:02, dcheng wrote:
> > Shouldn't there be some sort of PSA about these changes?
> 
> About removing calls to deprecated MessageLoop API or about the migration to
base/task_scheduler?

Both, really.

Powered by Google App Engine
This is Rietveld 408576698