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

Issue 369703003: Reduce usage of MessageLoopProxy in base/ (Closed)

Created:
6 years, 5 months ago by Ryan Sleevi
Modified:
5 years ago
CC:
chromium-reviews, zea+watch_chromium.org, posciak+watch_chromium.org, browser-components-watch_chromium.org, gavinp+memory_chromium.org, stuartmorgan+watch_chromium.org, Ilya Sherman, tim+watch_chromium.org, cbentzel+watch_chromium.org, benquan, jam, erikwright+watch_chromium.org, haitaol+watch_chromium.org, feature-media-reviews_chromium.org, dsinclair+watch_chromium.org, rouslan+autofillwatch_chromium.org, maniscalco+watch_chromium.org, tfarina, mcasas+watch_chromium.org, Dane Wallinga, dyu1, estade+watch_chromium.org, wjia+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Reduce the dependency on MessageLoopProxy in base/ as much as possible Specifically: - Replace MessageLoopProxy::current() with ThreadTaskRunnerHandle::Get() - Replace MessageLoopProxy with Scoped/SingleThreadTaskRunner as appropriate In support of this, there were two renames that occurred - Rename RefCountedDeleteOnMessageLoop to RefCountedDeleteOnTaskRunner, to better reflect what it does - Rename PrefMember::MoveToThread to PrefMember::UseAlternateTaskRunner BUG=391045

Patch Set 1 #

Total comments: 1

Patch Set 2 : Rebased #

Patch Set 3 : Unittest fixes for the two places with no message loops, avoiding a DCHECK #

Patch Set 4 : Explicit #

Total comments: 5

Patch Set 5 : Update to UseAlternateTaskRunner #

Patch Set 6 : Rebased #

Patch Set 7 : Rebased #

Patch Set 8 : Rebased #

Patch Set 9 : Rebased #

Patch Set 10 : Fix IWYU #

Patch Set 11 : Make SequencedWorkerPool forgiving of tests without a task runner, since they leak the SWP #

Patch Set 12 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+343 lines, -309 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M base/base.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M base/bind_helpers.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M base/debug/trace_event_impl.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -2 lines 0 comments Download
M base/debug/trace_event_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +16 lines, -13 lines 0 comments Download
M base/debug/trace_event_memory.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +10 lines, -11 lines 0 comments Download
M base/debug/trace_event_memory.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +9 lines, -11 lines 0 comments Download
M base/files/file_path_watcher.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +7 lines, -6 lines 0 comments Download
M base/files/file_path_watcher.cc View 1 chunk +0 lines, -1 line 0 comments Download
M base/files/file_path_watcher_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +10 lines, -9 lines 0 comments Download
M base/files/file_path_watcher_fsevents.cc View 1 2 3 4 5 6 7 6 chunks +9 lines, -7 lines 0 comments Download
M base/files/file_path_watcher_kqueue.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +2 lines, -3 lines 0 comments Download
M base/files/file_path_watcher_kqueue.cc View 1 2 3 4 5 6 7 4 chunks +9 lines, -7 lines 0 comments Download
M base/files/file_path_watcher_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +22 lines, -18 lines 0 comments Download
M base/files/file_path_watcher_win.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +7 lines, -6 lines 0 comments Download
M base/files/important_file_writer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +6 lines, -5 lines 0 comments Download
D base/memory/ref_counted_delete_on_message_loop.h View 1 chunk +0 lines, -70 lines 0 comments Download
A base/memory/ref_counted_delete_on_task_runner.h View 1 2 3 1 chunk +69 lines, -0 lines 0 comments Download
M base/observer_list_threadsafe.h View 4 chunks +11 lines, -9 lines 0 comments Download
M base/prefs/json_pref_store.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M base/prefs/pref_member.h View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +11 lines, -11 lines 0 comments Download
M base/prefs/pref_member.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +21 lines, -16 lines 0 comments Download
M base/prefs/pref_member_unittest.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M base/single_thread_task_runner.h View 1 chunk +2 lines, -1 line 0 comments Download
M base/task/cancelable_task_tracker.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +7 lines, -6 lines 0 comments Download
M base/test/launcher/test_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +10 lines, -10 lines 0 comments Download
M base/test/thread_test_helper.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +4 lines, -3 lines 0 comments Download
M base/test/thread_test_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -3 lines 0 comments Download
M base/threading/sequenced_worker_pool.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +2 lines, -4 lines 0 comments Download
M base/threading/sequenced_worker_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +18 lines, -12 lines 0 comments Download
M base/threading/worker_pool.h View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/io_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/media/media_device_id_salt.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/net/chrome_http_user_agent_settings.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/net/chrome_network_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/net/spdyproxy/proxy_advisor.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/plugins/plugin_info_message_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +16 lines, -13 lines 0 comments Download
M chromeos/login/auth/online_attempt_host.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -2 lines 0 comments Download
M components/autofill/core/browser/webdata/autofill_webdata_backend_impl.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -3 lines 0 comments Download
M components/autofill/core/browser/webdata/autofill_webdata_backend_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M components/signin/core/browser/webdata/token_web_data.cc View 3 chunks +4 lines, -6 lines 0 comments Download
M components/sync_driver/data_type_controller.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -3 lines 0 comments Download
M components/sync_driver/data_type_controller.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M components/webdata/common/web_data_service_backend.h View 3 chunks +3 lines, -3 lines 0 comments Download
M components/webdata/common/web_data_service_backend.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/webdata/common/web_data_service_base.h View 3 chunks +4 lines, -3 lines 0 comments Download
M components/webdata/common/web_data_service_base.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/webdata/common/web_database_service.h View 3 chunks +3 lines, -3 lines 0 comments Download
M components/webdata/common/web_database_service.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/browser/devtools/tethering_handler.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/devtools/tethering_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M net/disk_cache/simple/simple_entry_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 40 (1 generated)
Ryan Sleevi
ajwong because of his G+ +1 ;) But seriously, don't review this until after holidays...
6 years, 5 months ago (2014-07-03 02:16:02 UTC) #1
awong
rubber stamp LGTM w/o nit Die MLP! Die! https://codereview.chromium.org/369703003/diff/1/base/memory/ref_counted_delete_on_task_runner.h File base/memory/ref_counted_delete_on_task_runner.h (right): https://codereview.chromium.org/369703003/diff/1/base/memory/ref_counted_delete_on_task_runner.h#newcode36 base/memory/ref_counted_delete_on_task_runner.h:36: RefCountedDeleteOnTaskRunner( ...
6 years, 5 months ago (2014-07-07 21:50:00 UTC) #2
Ryan Sleevi
The CQ bit was checked by rsleevi@chromium.org
6 years, 5 months ago (2014-07-10 20:41:52 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsleevi@chromium.org/369703003/60001
6 years, 5 months ago (2014-07-10 20:42:39 UTC) #4
Ryan Sleevi
The CQ bit was unchecked by rsleevi@chromium.org
6 years, 5 months ago (2014-07-10 20:59:30 UTC) #5
Ryan Sleevi
darin for chrome/ rubberstamp blundell for components/ rubberstamp (Both of these were affected by the ...
6 years, 5 months ago (2014-07-10 21:04:59 UTC) #6
darin (slow to review)
https://codereview.chromium.org/369703003/diff/60001/base/prefs/pref_member.h File base/prefs/pref_member.h (right): https://codereview.chromium.org/369703003/diff/60001/base/prefs/pref_member.h#newcode68 base/prefs/pref_member.h:68: void MoveToTaskRunner( Hmm, MoveToThread seems like a better name. ...
6 years, 5 months ago (2014-07-10 22:12:06 UTC) #7
Ryan Sleevi
https://codereview.chromium.org/369703003/diff/60001/base/prefs/pref_member.h File base/prefs/pref_member.h (right): https://codereview.chromium.org/369703003/diff/60001/base/prefs/pref_member.h#newcode68 base/prefs/pref_member.h:68: void MoveToTaskRunner( On 2014/07/10 22:12:05, darin wrote: > Hmm, ...
6 years, 5 months ago (2014-07-10 22:46:37 UTC) #8
darin (slow to review)
On Thu, Jul 10, 2014 at 3:46 PM, <rsleevi@chromium.org> wrote: > > https://codereview.chromium.org/369703003/diff/60001/base/ > prefs/pref_member.h ...
6 years, 5 months ago (2014-07-10 23:01:47 UTC) #9
Ryan Sleevi
On 2014/07/10 23:01:47, darin wrote: > Yup. Maybe SetTaskRunner or UseAlternateTaskRunner would be a better ...
6 years, 5 months ago (2014-07-10 23:23:23 UTC) #10
darin (slow to review)
On 2014/07/10 23:23:23, Ryan Sleevi wrote: > On 2014/07/10 23:01:47, darin wrote: > > Yup. ...
6 years, 5 months ago (2014-07-10 23:33:08 UTC) #11
darin (slow to review)
On 2014/07/10 23:23:23, Ryan Sleevi wrote: > On 2014/07/10 23:01:47, darin wrote: > > Yup. ...
6 years, 5 months ago (2014-07-10 23:33:11 UTC) #12
blundell
//components LGTM
6 years, 5 months ago (2014-07-11 06:35:12 UTC) #13
Ryan Sleevi
The CQ bit was checked by rsleevi@chromium.org
6 years, 5 months ago (2014-07-11 06:36:28 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsleevi@chromium.org/369703003/80001
6 years, 5 months ago (2014-07-11 06:37:14 UTC) #15
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_chromeos_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-11 11:09:51 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-11 12:21:26 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chromeos_rel/builds/46697)
6 years, 5 months ago (2014-07-11 12:21:28 UTC) #18
Ryan Sleevi
The CQ bit was checked by rsleevi@chromium.org
6 years, 4 months ago (2014-08-20 06:01:07 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsleevi@chromium.org/369703003/140001
6 years, 4 months ago (2014-08-20 06:01:51 UTC) #20
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-20 09:57:42 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-20 10:09:23 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_swarming/builds/6001)
6 years, 4 months ago (2014-08-20 10:09:25 UTC) #23
Ryan Sleevi
The CQ bit was checked by rsleevi@chromium.org
6 years, 4 months ago (2014-08-20 22:12:49 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsleevi@chromium.org/369703003/180001
6 years, 4 months ago (2014-08-20 22:13:53 UTC) #25
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-21 01:45:04 UTC) #26
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-21 01:47:31 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg/builds/8169)
6 years, 4 months ago (2014-08-21 01:47:33 UTC) #28
Ryan Sleevi
The CQ bit was checked by rsleevi@chromium.org
6 years, 4 months ago (2014-08-21 02:35:09 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsleevi@chromium.org/369703003/180001
6 years, 4 months ago (2014-08-21 02:36:28 UTC) #30
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-21 04:14:55 UTC) #31
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-21 05:18:11 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/5450)
6 years, 4 months ago (2014-08-21 05:18:13 UTC) #33
Ryan Sleevi
The CQ bit was checked by rsleevi@chromium.org
6 years, 4 months ago (2014-08-21 06:42:23 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsleevi@chromium.org/369703003/200001
6 years, 4 months ago (2014-08-21 06:43:17 UTC) #35
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-21 13:57:41 UTC) #36
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-21 14:01:58 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/5266)
6 years, 4 months ago (2014-08-21 14:01:59 UTC) #38
blundell
5 years, 4 months ago (2015-08-03 16:03:09 UTC) #39
Is this CL still active?

Powered by Google App Engine
This is Rietveld 408576698