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

Issue 2037853002: Remove use of deprecated MessageLoop methods in ipc. (Closed)

Created:
4 years, 6 months ago by fdoray
Modified:
4 years, 6 months ago
Reviewers:
cpu_(ooo_6.6-7.5)
CC:
chromium-reviews, darin-cc_chromium.org, jam
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 ipc. 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 code on the bug). 2. Run tools/sort-headers.py on modified files. 3. Run git cl format. BUG=616447 R=cpu@chromium.org Committed: https://crrev.com/2eb9714a01e03a8b091a8ea34f023e24f62e5a9f Cr-Commit-Position: refs/heads/master@{#398040}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -6 lines) Patch
M ipc/ipc_channel_win.cc View 2 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 9 (4 generated)
cpu_(ooo_6.6-7.5)
lgtm
4 years, 6 months ago (2016-06-03 23:45:20 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037853002/1
4 years, 6 months ago (2016-06-06 14:42:43 UTC) #4
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 6 months ago (2016-06-06 16:10:39 UTC) #6
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/2eb9714a01e03a8b091a8ea34f023e24f62e5a9f Cr-Commit-Position: refs/heads/master@{#398040}
4 years, 6 months ago (2016-06-06 16:12:11 UTC) #8
fdoray
4 years, 6 months ago (2016-06-06 22:19:15 UTC) #9
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:1) has been created in
https://codereview.chromium.org/2038363004/ by fdoray@chromium.org.

The reason for reverting is: MessageLoopForIO::current() has a DCHECK but
ThreadTaskRunnerHandle::Get() doesn't. See discussion
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/Wj_cNO2l2qE.

Powered by Google App Engine
This is Rietveld 408576698