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

Issue 2034663003: Remove use of deprecated MessageLoop methods in content. (Closed)

Created:
4 years, 6 months ago by fdoray
Modified:
4 years, 6 months ago
Reviewers:
jam
CC:
chromium-reviews, yusukes+watch_chromium.org, tzik, posciak+watch_chromium.org, nasko+codewatch_chromium.org, yzshen+watch_chromium.org, sievers+watch_chromium.org, tracing+reviews_chromium.org, kinuko+watch, ben+mojo_chromium.org, miu+watch_chromium.org, jsbell+serviceworker_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, abarth-chromium, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, loading-reviews_chromium.org, kalyank, blink-worker-reviews_chromium.org, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, Peter Beverloo, nhiroki, feature-media-reviews_chromium.org, mcasas+watch+vc_chromium.org, piman+watch_chromium.org, mkwst+moarreviews-shell_chromium.org, darin (slow to review), jochen+watch_chromium.org, michaeln, wfh+watch_chromium.org, serviceworker-reviews, shuchen+watch_chromium.org, Aaron Boodman, kinuko+serviceworker, mkwst+moarreviews-renderer_chromium.org, horo+watch_chromium.org, danakj+watch_chromium.org, James Su, kinuko+fileapi
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 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}

Patch Set 1 #

Patch Set 2 : rebase #

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

Messages

Total messages: 13 (8 generated)
fdoray
Can you review this CL? Thanks.
4 years, 6 months ago (2016-06-06 16:35:14 UTC) #4
jam
lgtm
4 years, 6 months ago (2016-06-06 22:09:16 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034663003/20001
4 years, 6 months ago (2016-06-06 23:20:58 UTC) #9
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-06-07 04:28:52 UTC) #11
commit-bot: I haz the power
4 years, 6 months ago (2016-06-07 04:31:18 UTC) #13
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/7a8954a41c5f5a93c4b4640a404b0dacc88be173
Cr-Commit-Position: refs/heads/master@{#398224}

Powered by Google App Engine
This is Rietveld 408576698