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

Issue 1942053002: Deletes base::MessageLoop::set_thread_name(). (Closed)

Created:
4 years, 7 months ago by alokp
Modified:
4 years, 6 months ago
Reviewers:
danakj, gab, jam
CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, darin-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Deletes base::MessageLoop::set_thread_name(). Implements base::MessageLoop::GetThreadName by fetching the platform thread name. This new function replaces MessageLoop::thread_name_ and avoids having to store the thread name in multiple places. Committed: https://crrev.com/d52f9cbcefa77192c2024356a859cf3b4025c905 Cr-Commit-Position: refs/heads/master@{#399694}

Patch Set 1 #

Patch Set 2 : Implements SingleThreadTaskRunner::GetThreadName #

Total comments: 6

Patch Set 3 : rebase #

Patch Set 4 : addressed comments and updated subclasses #

Patch Set 5 : rebase #

Patch Set 6 : removed usage of MessageLoop::set_thread_name #

Patch Set 7 : fixed cc_unittests #

Patch Set 8 : fixed media_unittests #

Total comments: 5

Patch Set 9 : implements MessageLoop::GetThreadName #

Total comments: 2

Patch Set 10 : adds memory barrier #

Total comments: 4

Patch Set 11 : rebase only #

Patch Set 12 : no Atomic32 #

Total comments: 3

Patch Set 13 : rebase only #

Patch Set 14 : addressed comments #

Patch Set 15 : fixes mac/ios build #

Total comments: 2

Patch Set 16 : WebThreadImpl uses BrowserThreadImpl pattern #

Patch Set 17 : uses PlatformThread::GetName #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -68 lines) Patch
M base/message_loop/message_loop.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +7 lines, -7 lines 0 comments Download
M base/message_loop/message_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +23 lines, -6 lines 0 comments Download
M base/message_loop/message_loop_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +16 lines, -0 lines 0 comments Download
M base/threading/thread.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download
M base/trace_event/trace_log.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M chrome/app_shim/chrome_main_app_mode_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M chrome/chrome_watcher/chrome_watcher_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -1 line 0 comments Download
M chrome/common/service_process_util_unittest.cc View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M chrome/service/service_main.cc View 1 2 3 4 5 6 7 8 2 chunks +1 line, -2 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -4 lines 0 comments Download
M content/browser/browser_thread_impl.cc View 1 2 3 4 5 6 7 8 9 4 chunks +15 lines, -19 lines 0 comments Download
M ios/web/app/web_main_loop.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -5 lines 0 comments Download
M ios/web/web_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +12 lines, -16 lines 0 comments Download
M remoting/base/auto_thread.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download
M sync/engine/sync_scheduler_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 36 (13 generated)
alokp
4 years, 7 months ago (2016-05-02 23:03:43 UTC) #2
jam
It seems unfortunate that we have two places to store thread name. it seems there ...
4 years, 7 months ago (2016-05-02 23:57:53 UTC) #3
alokp
On 2016/05/02 23:57:53, jam wrote: > It seems unfortunate that we have two places to ...
4 years, 7 months ago (2016-05-03 05:58:04 UTC) #4
jam
On 2016/05/03 05:58:04, alokp wrote: > On 2016/05/02 23:57:53, jam wrote: > > It seems ...
4 years, 7 months ago (2016-05-03 16:01:59 UTC) #5
alokp
> The name wouldn't be available in BindToCurrentThread (since that's called in > ctor of ...
4 years, 7 months ago (2016-05-04 22:46:33 UTC) #8
jam
great, this is fine by me but a base/ owner should look. https://codereview.chromium.org/1942053002/diff/20001/base/message_loop/message_loop.h File base/message_loop/message_loop.h ...
4 years, 7 months ago (2016-05-06 16:50:23 UTC) #9
alokp
Dana: base/ https://codereview.chromium.org/1942053002/diff/20001/base/message_loop/message_loop.h File base/message_loop/message_loop.h (right): https://codereview.chromium.org/1942053002/diff/20001/base/message_loop/message_loop.h#newcode298 base/message_loop/message_loop.h:298: const char* GetThreadName() const { return task_runner_->GetThreadName(); ...
4 years, 7 months ago (2016-05-07 04:14:05 UTC) #12
danakj
+gab thoughts?
4 years, 7 months ago (2016-05-10 21:49:29 UTC) #14
gab
Reviewed and added nits as I went, pasted below but probably irrelevant in the light ...
4 years, 7 months ago (2016-05-12 15:50:57 UTC) #16
alokp
Gabriel: Thanks for the detailed feedback. I have removed the SingleThreadTaskRunner::GetThreadName interface and implemented MessageLoop::GetThreadName ...
4 years, 7 months ago (2016-05-18 23:48:15 UTC) #19
gab
lg % synchronization requirement https://codereview.chromium.org/1942053002/diff/160001/base/message_loop/message_loop.cc File base/message_loop/message_loop.cc (right): https://codereview.chromium.org/1942053002/diff/160001/base/message_loop/message_loop.cc#newcode421 base/message_loop/message_loop.cc:421: thread_id_ = PlatformThread::CurrentId(); This needs ...
4 years, 7 months ago (2016-05-20 20:25:39 UTC) #20
alokp
https://codereview.chromium.org/1942053002/diff/160001/base/message_loop/message_loop.cc File base/message_loop/message_loop.cc (right): https://codereview.chromium.org/1942053002/diff/160001/base/message_loop/message_loop.cc#newcode421 base/message_loop/message_loop.cc:421: thread_id_ = PlatformThread::CurrentId(); On 2016/05/20 20:25:39, gab wrote: > ...
4 years, 6 months ago (2016-06-01 19:23:18 UTC) #21
gab
Reply below. PS: Please do separate patch sets when rebasing (one for the rebase, one ...
4 years, 6 months ago (2016-06-03 15:31:17 UTC) #22
alokp
https://codereview.chromium.org/1942053002/diff/180001/base/message_loop/message_loop.cc File base/message_loop/message_loop.cc (right): https://codereview.chromium.org/1942053002/diff/180001/base/message_loop/message_loop.cc#newcode424 base/message_loop/message_loop.cc:424: subtle::Release_Load(&thread_id_)); On 2016/06/03 15:31:17, gab wrote: > I don't ...
4 years, 6 months ago (2016-06-03 16:34:56 UTC) #23
gab
https://codereview.chromium.org/1942053002/diff/180001/base/message_loop/message_loop.cc File base/message_loop/message_loop.cc (right): https://codereview.chromium.org/1942053002/diff/180001/base/message_loop/message_loop.cc#newcode424 base/message_loop/message_loop.cc:424: subtle::Release_Load(&thread_id_)); On 2016/06/03 16:34:56, alokp wrote: > On 2016/06/03 ...
4 years, 6 months ago (2016-06-07 00:31:00 UTC) #24
alokp
https://codereview.chromium.org/1942053002/diff/180001/base/message_loop/message_loop.cc File base/message_loop/message_loop.cc (right): https://codereview.chromium.org/1942053002/diff/180001/base/message_loop/message_loop.cc#newcode424 base/message_loop/message_loop.cc:424: subtle::Release_Load(&thread_id_)); On 2016/06/07 00:30:59, gab wrote: > On 2016/06/03 ...
4 years, 6 months ago (2016-06-10 22:13:00 UTC) #25
gab
lgtm w/ question, thanks!! https://codereview.chromium.org/1942053002/diff/280001/ios/web/web_thread_impl.cc File ios/web/web_thread_impl.cc (right): https://codereview.chromium.org/1942053002/diff/280001/ios/web/web_thread_impl.cc#newcode118 ios/web/web_thread_impl.cc:118: : Thread(message_loop->GetThreadName()), identifier_(identifier) { Is ...
4 years, 6 months ago (2016-06-13 18:57:35 UTC) #26
jam
lgtm
4 years, 6 months ago (2016-06-13 19:28:39 UTC) #27
alokp
https://codereview.chromium.org/1942053002/diff/280001/ios/web/web_thread_impl.cc File ios/web/web_thread_impl.cc (right): https://codereview.chromium.org/1942053002/diff/280001/ios/web/web_thread_impl.cc#newcode118 ios/web/web_thread_impl.cc:118: : Thread(message_loop->GetThreadName()), identifier_(identifier) { On 2016/06/13 18:57:35, gab wrote: ...
4 years, 6 months ago (2016-06-14 12:31:22 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1942053002/320001
4 years, 6 months ago (2016-06-14 12:31:40 UTC) #31
commit-bot: I haz the power
Committed patchset #17 (id:320001)
4 years, 6 months ago (2016-06-14 14:00:06 UTC) #33
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-14 14:00:27 UTC) #34
commit-bot: I haz the power
4 years, 6 months ago (2016-06-14 14:01:27 UTC) #36
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/d52f9cbcefa77192c2024356a859cf3b4025c905
Cr-Commit-Position: refs/heads/master@{#399694}

Powered by Google App Engine
This is Rietveld 408576698