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

Issue 2910473005: Deprecate NonThreadSafe in net/ in favor of SequenceChecker/ThreadChecker. (Closed)

Created:
3 years, 7 months ago by gab
Modified:
3 years, 6 months ago
Reviewers:
benwells, mmenke, alokp
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org, net-reviews_chromium.org, eroman, bnc+watch_chromium.org, Ryan Sleevi
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Deprecate NonThreadSafe in net/ in favor of ThreadChecker. This change was scripted by the ThreadChecker equivalent of https://crbug.com/676387#c8. Noteworthy: * ~NonThreadSafe() used to implicitly check, ~ThreadChecker() doesn't so explicit checks were added in relevant destructors to maintain status quo * NonThreadSafe provided a public interface for CalledOnValidThread() and protected for DetachFromThread(). The ThreadChecker was exposed as protected where required and public AssertCalledOnValidThread() methods added as appropriate. BUG=676387 TBR=alokp,benwells Review-Url: https://codereview.chromium.org/2910473005 Cr-Commit-Position: refs/heads/master@{#476681} Committed: https://chromium.googlesource.com/chromium/src/+/47aa7da88b306da3da8cefa5180ddcad753107f5

Patch Set 1 #

Patch Set 2 : update regex to also match NET_EXPORT_PRIVATE classes #

Patch Set 3 : fix style compile #

Patch Set 4 : fix IWYU #

Patch Set 5 : another compile nit #

Total comments: 4

Patch Set 6 : fix POSIX compile #

Patch Set 7 : Fix chromecast compile #

Total comments: 1

Patch Set 8 : SequenceChecker => ThreadChecker #

Patch Set 9 : fix compile #

Total comments: 4

Patch Set 10 : s/detach/dcheck TODO #

Patch Set 11 : rebase on r476354 #

Patch Set 12 : rebase on r476634 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+394 lines, -308 lines) Patch
M chrome/browser/custom_handlers/protocol_handler_registry.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chromecast/browser/cast_network_delegate.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/base/backoff_entry.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -2 lines 0 comments Download
M net/base/backoff_entry.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M net/base/network_change_notifier_win.h View 1 2 3 4 5 6 7 3 chunks +5 lines, -4 lines 0 comments Download
M net/base/network_change_notifier_win.cc View 1 2 3 4 5 6 7 5 chunks +5 lines, -4 lines 0 comments Download
M net/base/network_delegate.h View 1 2 3 4 5 6 7 4 chunks +6 lines, -3 lines 0 comments Download
M net/base/network_delegate.cc View 1 2 3 4 5 6 7 14 chunks +26 lines, -22 lines 0 comments Download
M net/base/priority_queue.h View 1 2 3 4 5 6 7 13 chunks +19 lines, -15 lines 0 comments Download
M net/cert/multi_threaded_cert_verifier.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -4 lines 0 comments Download
M net/cert/multi_threaded_cert_verifier.cc View 1 2 3 4 5 6 7 4 chunks +4 lines, -3 lines 0 comments Download
M net/dns/address_sorter_posix.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -2 lines 0 comments Download
M net/dns/address_sorter_posix.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download
M net/dns/dns_config_service.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download
M net/dns/dns_config_service.cc View 1 2 3 4 5 6 7 8 chunks +9 lines, -8 lines 0 comments Download
M net/dns/dns_config_service_posix.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -4 lines 0 comments Download
M net/dns/dns_config_service_win.cc View 1 2 3 4 5 6 7 7 chunks +15 lines, -7 lines 0 comments Download
M net/dns/dns_transaction.cc View 1 2 3 4 5 6 7 5 chunks +6 lines, -4 lines 0 comments Download
M net/dns/host_cache.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -2 lines 0 comments Download
M net/dns/host_cache.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +8 lines, -7 lines 0 comments Download
M net/dns/host_resolver_impl.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -2 lines 0 comments Download
M net/dns/host_resolver_impl.cc View 1 2 3 4 5 6 7 6 chunks +6 lines, -5 lines 0 comments Download
M net/dns/mock_host_resolver.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -4 lines 0 comments Download
M net/dns/mock_host_resolver.cc View 1 2 3 4 5 6 7 4 chunks +4 lines, -3 lines 0 comments Download
M net/http/http_auth_controller.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download
M net/http/http_auth_controller.cc View 1 2 3 4 5 6 7 12 chunks +17 lines, -17 lines 0 comments Download
M net/http/http_cache.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download
M net/http/http_cache.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M net/http/http_network_layer.h View 1 2 3 4 5 6 7 3 chunks +5 lines, -5 lines 0 comments Download
M net/http/http_network_layer.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M net/http/http_network_session.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -4 lines 0 comments Download
M net/http/http_network_session.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M net/http/http_server_properties_impl.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +4 lines, -3 lines 0 comments Download
M net/http/http_server_properties_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +9 lines, -8 lines 0 comments Download
M net/http/transport_security_state.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +8 lines, -3 lines 0 comments Download
M net/http/transport_security_state.cc View 1 2 3 4 5 6 7 8 9 10 29 chunks +34 lines, -34 lines 0 comments Download
M net/log/net_log_util.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M net/log/write_to_file_net_log_observer.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M net/proxy/dhcp_proxy_script_adapter_fetcher_win.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download
M net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc View 1 2 3 4 5 6 7 5 chunks +9 lines, -8 lines 0 comments Download
M net/proxy/dhcp_proxy_script_fetcher_win.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download
M net/proxy/dhcp_proxy_script_fetcher_win.cc View 1 2 3 4 5 6 7 6 chunks +8 lines, -7 lines 0 comments Download
M net/proxy/multi_threaded_proxy_resolver.cc View 1 2 3 4 5 6 7 8 chunks +9 lines, -8 lines 0 comments Download
M net/proxy/proxy_resolver_v8_tracing.cc View 1 2 3 4 5 6 7 5 chunks +6 lines, -3 lines 0 comments Download
M net/proxy/proxy_service.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download
M net/proxy/proxy_service.cc View 1 2 3 4 5 6 7 9 chunks +10 lines, -9 lines 0 comments Download
M net/ssl/channel_id_service.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -6 lines 0 comments Download
M net/ssl/channel_id_service.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +6 lines, -5 lines 0 comments Download
M net/ssl/channel_id_store.h View 1 2 3 4 5 6 7 4 chunks +6 lines, -4 lines 0 comments Download
M net/ssl/channel_id_store.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M net/ssl/default_channel_id_store.cc View 1 2 3 4 5 6 7 12 chunks +14 lines, -14 lines 0 comments Download
M net/url_request/sdch_dictionary_fetcher.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download
M net/url_request/sdch_dictionary_fetcher.cc View 1 2 3 4 5 6 7 10 chunks +11 lines, -10 lines 0 comments Download
M net/url_request/test_url_fetcher_factory.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M net/url_request/test_url_fetcher_factory.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M net/url_request/url_request.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download
M net/url_request/url_request.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M net/url_request/url_request_context.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +8 lines, -3 lines 0 comments Download
M net/url_request/url_request_context.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M net/url_request/url_request_intercepting_job_factory.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M net/url_request/url_request_job_factory.h View 1 2 3 4 5 6 7 3 chunks +5 lines, -3 lines 0 comments Download
M net/url_request/url_request_job_factory.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M net/url_request/url_request_job_factory_impl.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -4 lines 0 comments Download
M net/url_request/url_request_throttler_manager.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download
M net/url_request/url_request_throttler_manager.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 91 (68 generated)
gab
Ryan PTaL, thanks
3 years, 7 months ago (2017-05-26 00:27:40 UTC) #3
Ryan Sleevi
Another one where I'm out today, so asking Matt and Eric to check out and/or ...
3 years, 7 months ago (2017-05-26 11:54:50 UTC) #27
mmenke
https://codereview.chromium.org/2910473005/diff/140001/net/base/network_change_notifier_win.cc File net/base/network_change_notifier_win.cc (right): https://codereview.chromium.org/2910473005/diff/140001/net/base/network_change_notifier_win.cc#newcode70 net/base/network_change_notifier_win.cc:70: CancelIPChangeNotify(&addr_overlapped_); This class uses an overlapped structure, which I ...
3 years, 6 months ago (2017-05-26 20:20:03 UTC) #36
gab
On 2017/05/26 20:20:03, mmenke wrote: > https://codereview.chromium.org/2910473005/diff/140001/net/base/network_change_notifier_win.cc > File net/base/network_change_notifier_win.cc (right): > > https://codereview.chromium.org/2910473005/diff/140001/net/base/network_change_notifier_win.cc#newcode70 > ...
3 years, 6 months ago (2017-05-30 14:33:36 UTC) #37
mmenke
On 2017/05/30 14:33:36, gab wrote: > On 2017/05/26 20:20:03, mmenke wrote: > > > https://codereview.chromium.org/2910473005/diff/140001/net/base/network_change_notifier_win.cc ...
3 years, 6 months ago (2017-05-30 16:30:03 UTC) #38
mmenke
On 2017/05/30 16:30:03, mmenke wrote: > On 2017/05/30 14:33:36, gab wrote: > > On 2017/05/26 ...
3 years, 6 months ago (2017-05-30 16:37:18 UTC) #39
gab
Migrated to ThreadChecker instead as discussed offline PTanL @mmenke as official reviewer in an attempt ...
3 years, 6 months ago (2017-05-30 21:15:53 UTC) #45
mmenke
On 2017/05/30 21:15:53, gab wrote: > Migrated to ThreadChecker instead as discussed offline PTanL > ...
3 years, 6 months ago (2017-05-30 21:23:59 UTC) #46
mmenke
On 2017/05/30 21:23:59, mmenke wrote: > On 2017/05/30 21:15:53, gab wrote: > > Migrated to ...
3 years, 6 months ago (2017-05-31 15:41:40 UTC) #49
gab
On 2017/05/31 15:41:40, mmenke wrote: > On 2017/05/30 21:23:59, mmenke wrote: > > On 2017/05/30 ...
3 years, 6 months ago (2017-05-31 19:06:44 UTC) #56
mmenke
LGTM, modulo comments. https://codereview.chromium.org/2910473005/diff/180001/net/base/backoff_entry.cc File net/base/backoff_entry.cc (right): https://codereview.chromium.org/2910473005/diff/180001/net/base/backoff_entry.cc#newcode31 net/base/backoff_entry.cc:31: DETACH_FROM_THREAD(thread_checker_); Is this needed? thread_checker_ doesn't ...
3 years, 6 months ago (2017-05-31 19:28:08 UTC) #59
gab
https://codereview.chromium.org/2910473005/diff/180001/net/base/backoff_entry.cc File net/base/backoff_entry.cc (right): https://codereview.chromium.org/2910473005/diff/180001/net/base/backoff_entry.cc#newcode31 net/base/backoff_entry.cc:31: DETACH_FROM_THREAD(thread_checker_); On 2017/05/31 19:28:08, mmenke wrote: > Is this ...
3 years, 6 months ago (2017-05-31 20:46:36 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2910473005/200001
3 years, 6 months ago (2017-06-01 18:54:56 UTC) #67
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/453548)
3 years, 6 months ago (2017-06-01 19:04:48 UTC) #69
gab
TBR alokp for chromecast side-effects TBR benwells for c/b/custom_handlers side-effects
3 years, 6 months ago (2017-06-01 19:16:13 UTC) #72
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2910473005/200001
3 years, 6 months ago (2017-06-01 19:17:00 UTC) #74
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/453586)
3 years, 6 months ago (2017-06-01 19:29:48 UTC) #76
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2910473005/220001
3 years, 6 months ago (2017-06-01 20:01:14 UTC) #79
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/228776)
3 years, 6 months ago (2017-06-01 21:37:26 UTC) #81
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2910473005/220001
3 years, 6 months ago (2017-06-01 21:40:08 UTC) #83
commit-bot: I haz the power
Failed to apply patch for net/http/http_server_properties_impl.h: While running git apply --index -3 -p1; error: patch ...
3 years, 6 months ago (2017-06-01 23:16:12 UTC) #85
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2910473005/240001
3 years, 6 months ago (2017-06-02 14:26:15 UTC) #88
commit-bot: I haz the power
3 years, 6 months ago (2017-06-02 16:09:56 UTC) #91
Message was sent while issue was closed.
Committed patchset #12 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/47aa7da88b306da3da8cefa5180d...

Powered by Google App Engine
This is Rietveld 408576698