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

Issue 615083004: Use ThreadChecker rather than DCHECK_CURRENTLY_ON. (Closed)

Created:
6 years, 2 months ago by Jun Mukai
Modified:
6 years, 2 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, markusheintz_, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Use ThreadChecker rather than DCHECK_CURRENTLY_ON. This is to remove the code dependency on //content/ so that more content_settings files can be in components/content_settings/core. At the first glance, it may look like adding a new restriction that HostContentSettingsMap has to be initialized on UI thread. However, this doesn't change any conditions. Actually, that restriction already exists on the current code implicitly on: - HostContentSettingsMap creates OverrideProvider - OverrideProvider ctor calls ReadOverrideSettings - ReadOverrideSettings assumes called on UI thread So this CL simply moves the thread checking. BUG=384876 R=bauerb@chromium.org, vabr@chromium.org, rlp@chromium.org, rocket@chromium.org, phajdan.jr@chromium.org TEST=no breaks on existing tests Committed: https://crrev.com/a1aa3518032217fd605d9435a31fc2b6c4e5e3f9 Cr-Commit-Position: refs/heads/master@{#300733}

Patch Set 1 #

Patch Set 2 : fix #

Total comments: 6

Patch Set 3 : fix #

Total comments: 2

Patch Set 4 : comment fix #

Total comments: 4

Patch Set 5 : DCHECK testing_profile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -83 lines) Patch
M chrome/browser/content_settings/content_settings_default_provider.cc View 1 2 3 4 4 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/content_settings/content_settings_default_provider_unittest.cc View 1 chunk +1 line, -6 lines 0 comments Download
M chrome/browser/content_settings/content_settings_internal_extension_provider.cc View 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/content_settings/content_settings_override_provider.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/content_settings_override_provider.cc View 1 2 3 4 3 chunks +1 line, -5 lines 0 comments Download
M chrome/browser/content_settings/content_settings_policy_provider.cc View 4 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/content_settings/content_settings_policy_provider_unittest.cc View 6 chunks +6 lines, -23 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pref_provider.cc View 6 chunks +5 lines, -8 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pref_provider_unittest.cc View 1 2 3 4 9 chunks +8 lines, -21 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map.h View 1 2 3 4 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map.cc View 3 5 chunks +2 lines, -6 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_impl.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/base/testing_profile.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/content_settings/core/browser/content_settings_observable_provider.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M components/content_settings/core/browser/content_settings_observable_provider.cc View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (9 generated)
Jun Mukai
6 years, 2 months ago (2014-10-01 08:13:53 UTC) #2
blundell
On 2014/10/01 08:13:53, Jun Mukai wrote: (you should specify which parts of the CL you ...
6 years, 2 months ago (2014-10-01 08:15:45 UTC) #3
Jun Mukai
On 2014/10/01 08:15:45, blundell wrote: > On 2014/10/01 08:13:53, Jun Mukai wrote: > > (you ...
6 years, 2 months ago (2014-10-01 08:54:46 UTC) #4
vabr (Chromium)
Thanks Jun! LGTM with two comments/questions. Vaclav https://codereview.chromium.org/615083004/diff/20001/chrome/browser/profiles/profile_impl.cc File chrome/browser/profiles/profile_impl.cc (right): https://codereview.chromium.org/615083004/diff/20001/chrome/browser/profiles/profile_impl.cc#newcode635 chrome/browser/profiles/profile_impl.cc:635: // Make ...
6 years, 2 months ago (2014-10-01 11:14:48 UTC) #5
Bernhard Bauer
https://codereview.chromium.org/615083004/diff/20001/chrome/browser/content_settings/host_content_settings_map.h File chrome/browser/content_settings/host_content_settings_map.h (right): https://codereview.chromium.org/615083004/diff/20001/chrome/browser/content_settings/host_content_settings_map.h#newcode48 chrome/browser/content_settings/host_content_settings_map.h:48: // Note that HostContentSettingsMap assumes it's created on the ...
6 years, 2 months ago (2014-10-01 11:41:09 UTC) #6
Jun Mukai
Sorry for the long interval but addressed the comments. Please take another look. https://codereview.chromium.org/615083004/diff/20001/chrome/browser/content_settings/host_content_settings_map.h File ...
6 years, 2 months ago (2014-10-14 23:53:13 UTC) #7
rpetterson
profiles LGTM
6 years, 2 months ago (2014-10-15 00:07:02 UTC) #8
vabr (Chromium)
Still LGTM, Thanks! Vaclav
6 years, 2 months ago (2014-10-15 10:41:05 UTC) #9
Bernhard Bauer
https://codereview.chromium.org/615083004/diff/40001/chrome/browser/content_settings/host_content_settings_map.cc File chrome/browser/content_settings/host_content_settings_map.cc (right): https://codereview.chromium.org/615083004/diff/40001/chrome/browser/content_settings/host_content_settings_map.cc#newcode80 chrome/browser/content_settings/host_content_settings_map.cc:80: // This should be called on the UI thread, ...
6 years, 2 months ago (2014-10-15 12:37:03 UTC) #10
Jun Mukai
https://codereview.chromium.org/615083004/diff/40001/chrome/browser/content_settings/host_content_settings_map.cc File chrome/browser/content_settings/host_content_settings_map.cc (right): https://codereview.chromium.org/615083004/diff/40001/chrome/browser/content_settings/host_content_settings_map.cc#newcode80 chrome/browser/content_settings/host_content_settings_map.cc:80: // This should be called on the UI thread, ...
6 years, 2 months ago (2014-10-15 23:46:19 UTC) #11
Bernhard Bauer
LGTM!
6 years, 2 months ago (2014-10-16 08:25:01 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/615083004/60001
6 years, 2 months ago (2014-10-16 16:35:35 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/18075)
6 years, 2 months ago (2014-10-16 16:44:12 UTC) #16
Jun Mukai
rockot, pajdan.jr, please review: - rockot: chrome/browser/extensions/extension_service.cc - phajdan.jr: chrome/test/base/testing_profile.cc thanks!
6 years, 2 months ago (2014-10-17 18:05:45 UTC) #18
Ken Rockot(use gerrit already)
On 2014/10/17 18:05:45, Jun Mukai wrote: > rockot, pajdan.jr, please review: > - rockot: chrome/browser/extensions/extension_service.cc ...
6 years, 2 months ago (2014-10-17 18:09:42 UTC) #19
Paweł Hajdan Jr.
https://codereview.chromium.org/615083004/diff/60001/chrome/test/base/testing_profile.cc File chrome/test/base/testing_profile.cc (right): https://codereview.chromium.org/615083004/diff/60001/chrome/test/base/testing_profile.cc#newcode833 chrome/test/base/testing_profile.cc:833: DCHECK(!content::BrowserThread::IsThreadInitialized( This seems the only place in this patch ...
6 years, 2 months ago (2014-10-20 09:11:51 UTC) #20
Jun Mukai
https://codereview.chromium.org/615083004/diff/60001/chrome/test/base/testing_profile.cc File chrome/test/base/testing_profile.cc (right): https://codereview.chromium.org/615083004/diff/60001/chrome/test/base/testing_profile.cc#newcode833 chrome/test/base/testing_profile.cc:833: DCHECK(!content::BrowserThread::IsThreadInitialized( On 2014/10/20 09:11:51, Paweł Hajdan Jr. wrote: > ...
6 years, 2 months ago (2014-10-20 17:02:51 UTC) #21
Paweł Hajdan Jr.
https://codereview.chromium.org/615083004/diff/60001/chrome/test/base/testing_profile.cc File chrome/test/base/testing_profile.cc (right): https://codereview.chromium.org/615083004/diff/60001/chrome/test/base/testing_profile.cc#newcode833 chrome/test/base/testing_profile.cc:833: DCHECK(!content::BrowserThread::IsThreadInitialized( On 2014/10/20 17:02:51, Jun Mukai wrote: > On ...
6 years, 2 months ago (2014-10-21 09:30:58 UTC) #22
Jun Mukai
https://codereview.chromium.org/615083004/diff/60001/chrome/test/base/testing_profile.cc File chrome/test/base/testing_profile.cc (right): https://codereview.chromium.org/615083004/diff/60001/chrome/test/base/testing_profile.cc#newcode833 chrome/test/base/testing_profile.cc:833: DCHECK(!content::BrowserThread::IsThreadInitialized( On 2014/10/21 09:30:58, Paweł Hajdan Jr. wrote: > ...
6 years, 2 months ago (2014-10-22 06:30:13 UTC) #23
Jun Mukai
6 years, 2 months ago (2014-10-22 06:30:14 UTC) #24
Paweł Hajdan Jr.
chrome/test LGTM Thank you for your patience with my review comment and doing the test. ...
6 years, 2 months ago (2014-10-22 11:20:48 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/615083004/80001
6 years, 2 months ago (2014-10-22 16:51:10 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel/builds/3660)
6 years, 2 months ago (2014-10-22 17:03:52 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/615083004/80001
6 years, 2 months ago (2014-10-22 18:09:57 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel/builds/3824)
6 years, 2 months ago (2014-10-22 19:28:25 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/615083004/80001
6 years, 2 months ago (2014-10-22 19:37:26 UTC) #35
commit-bot: I haz the power
Committed patchset #5 (id:80001)
6 years, 2 months ago (2014-10-22 20:14:20 UTC) #36
commit-bot: I haz the power
6 years, 2 months ago (2014-10-22 20:15:28 UTC) #37
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/a1aa3518032217fd605d9435a31fc2b6c4e5e3f9
Cr-Commit-Position: refs/heads/master@{#300733}

Powered by Google App Engine
This is Rietveld 408576698