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

Issue 2033693004: Remove use of deprecated MessageLoop methods in sql. (Closed)

Created:
4 years, 6 months ago by fdoray
Modified:
4 years, 6 months ago
CC:
chromium-reviews
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 sql. 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=shess@chromium.org Committed: https://crrev.com/2dfa7645163fd0f3d39c25007ebc08932f3e0207 Cr-Commit-Position: refs/heads/master@{#398284}

Patch Set 1 #

Total comments: 2

Patch Set 2 : if (base::MessageLoop::current()) -> if (base::ThreadTaskRunnerHandle::Get()) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -7 lines) Patch
M sql/connection.cc View 1 2 chunks +9 lines, -7 lines 0 comments Download

Messages

Total messages: 12 (5 generated)
fdoray
Can you review this CL? Thanks.
4 years, 6 months ago (2016-06-06 16:38:01 UTC) #2
Scott Hess - ex-Googler
https://codereview.chromium.org/2033693004/diff/1/sql/connection.cc File sql/connection.cc (right): https://codereview.chromium.org/2033693004/diff/1/sql/connection.cc#newcode166 sql/connection.cc:166: if (base::MessageLoop::current()) { Is this test supported in the ...
4 years, 6 months ago (2016-06-06 22:10:46 UTC) #3
fdoray
PTAnL https://codereview.chromium.org/2033693004/diff/1/sql/connection.cc File sql/connection.cc (right): https://codereview.chromium.org/2033693004/diff/1/sql/connection.cc#newcode166 sql/connection.cc:166: if (base::MessageLoop::current()) { On 2016/06/06 22:10:46, Scott Hess ...
4 years, 6 months ago (2016-06-07 00:00:00 UTC) #5
Scott Hess - ex-Googler
lgtm
4 years, 6 months ago (2016-06-07 02:49:02 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2033693004/20001
4 years, 6 months ago (2016-06-07 12:09:34 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-06-07 13:11:34 UTC) #10
commit-bot: I haz the power
4 years, 6 months ago (2016-06-07 13:12:59 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/2dfa7645163fd0f3d39c25007ebc08932f3e0207
Cr-Commit-Position: refs/heads/master@{#398284}

Powered by Google App Engine
This is Rietveld 408576698