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

Issue 1754073002: Migrate old settings for ContentSettingTypes with wildcard as secondary_pattern (Closed)

Created:
4 years, 9 months ago by lshang
Modified:
4 years, 8 months ago
Reviewers:
jww, raymes, estark
CC:
chromium-reviews, markusheintz_, msramek+watch_chromium.org, raymes+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@scoping_set_content_setting
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Migrate old settings for ContentSettingTypes with wildcard as secondary_pattern For ContentSettingsTypes with scoping type: REQUESTING_DOMAIN_ONLY_SCOPE, TOP_LEVEL_DOMAIN_ONLY_SCOPE and REQUESTING_ORIGIN_ONLY_SCOPE, we recently changed the way their content settings are stored. Their secondary_patterns are changed to be wildcard. But previously in some cases they use the same pattern twice instead of using wildcard. This has no impact on lookups using GetContentSetting (because Wildcard matches everything) but it has an impact when trying to change the existing content setting(will be ignored). The solution is to migrate all old-format settings on construction. BUG=551747 Committed: https://crrev.com/8bdcd7288b89a3d8cac5d64c5b948da2eb14c501 Cr-Commit-Position: refs/heads/master@{#385119}

Patch Set 1 #

Total comments: 4

Patch Set 2 : add test #

Patch Set 3 : rebase #

Total comments: 9

Patch Set 4 : rebase #

Patch Set 5 : rebase #

Patch Set 6 : move keygen related to another cl #

Patch Set 7 : return in advance #

Patch Set 8 : add check for user preference settings #

Total comments: 6

Patch Set 9 : add keygen #

Total comments: 2

Patch Set 10 : addressing review comments #

Patch Set 11 : use string 'preference' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -1 line) Patch
M chrome/browser/content_settings/host_content_settings_map_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +50 lines, -0 lines 0 comments Download
M chrome/browser/ssl/chrome_ssl_host_state_delegate.cc View 1 2 3 4 5 6 7 10 1 chunk +3 lines, -0 lines 0 comments Download
M components/content_settings/core/browser/host_content_settings_map.h View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -1 line 0 comments Download
M components/content_settings/core/browser/host_content_settings_map.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +48 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 37 (14 generated)
lshang
PTAL thanks!
4 years, 9 months ago (2016-03-02 04:04:01 UTC) #4
raymes
Thanks Liu, this looks good. We should try to add some tests if we can. ...
4 years, 9 months ago (2016-03-02 04:32:49 UTC) #5
raymes
https://codereview.chromium.org/1754073002/diff/1/components/content_settings/core/browser/host_content_settings_map.cc File components/content_settings/core/browser/host_content_settings_map.cc (right): https://codereview.chromium.org/1754073002/diff/1/components/content_settings/core/browser/host_content_settings_map.cc#newcode77 components/content_settings/core/browser/host_content_settings_map.cc:77: CONTENT_SETTINGS_TYPE_MIXEDSCRIPT}; Also, it could be good to add the ...
4 years, 9 months ago (2016-03-02 04:38:11 UTC) #6
lshang
Raymes, I added a test for migrate old settings. PTAL thanks! https://codereview.chromium.org/1754073002/diff/1/components/content_settings/core/browser/host_content_settings_map.cc File components/content_settings/core/browser/host_content_settings_map.cc (right): ...
4 years, 9 months ago (2016-03-03 02:55:14 UTC) #7
raymes
Thanks Liu! https://codereview.chromium.org/1754073002/diff/40001/chrome/browser/content_settings/host_content_settings_map_unittest.cc File chrome/browser/content_settings/host_content_settings_map_unittest.cc (right): https://codereview.chromium.org/1754073002/diff/40001/chrome/browser/content_settings/host_content_settings_map_unittest.cc#newcode1172 chrome/browser/content_settings/host_content_settings_map_unittest.cc:1172: host, host, CONTENT_SETTINGS_TYPE_NOTIFICATIONS, std::string())); Hey Liu, I ...
4 years, 9 months ago (2016-03-07 01:47:56 UTC) #8
lshang
Raymes, can you take a another look at this? Thanks! https://codereview.chromium.org/1754073002/diff/40001/chrome/browser/content_settings/host_content_settings_map_unittest.cc File chrome/browser/content_settings/host_content_settings_map_unittest.cc (right): https://codereview.chromium.org/1754073002/diff/40001/chrome/browser/content_settings/host_content_settings_map_unittest.cc#newcode1178 ...
4 years, 9 months ago (2016-03-23 13:58:36 UTC) #10
lshang
Hi Raymes, PTAL thanks! I added a check to migrate user preferences only. CONTENT_SETTINGS_TYPE_DEFAULT is ...
4 years, 8 months ago (2016-03-29 00:33:02 UTC) #12
raymes
https://codereview.chromium.org/1754073002/diff/170001/components/content_settings/core/browser/host_content_settings_map.cc File components/content_settings/core/browser/host_content_settings_map.cc (right): https://codereview.chromium.org/1754073002/diff/170001/components/content_settings/core/browser/host_content_settings_map.cc#newcode478 components/content_settings/core/browser/host_content_settings_map.cc:478: // 0 nit: fill 80chars https://codereview.chromium.org/1754073002/diff/170001/components/content_settings/core/browser/host_content_settings_map.cc#newcode480 components/content_settings/core/browser/host_content_settings_map.cc:480: CONTENT_SETTINGS_TYPE_DEFAULT}; Maybe ...
4 years, 8 months ago (2016-03-29 04:43:47 UTC) #13
lshang
https://codereview.chromium.org/1754073002/diff/170001/components/content_settings/core/browser/host_content_settings_map.cc File components/content_settings/core/browser/host_content_settings_map.cc (right): https://codereview.chromium.org/1754073002/diff/170001/components/content_settings/core/browser/host_content_settings_map.cc#newcode478 components/content_settings/core/browser/host_content_settings_map.cc:478: // 0 On 2016/03/29 04:43:46, raymes wrote: > nit: ...
4 years, 8 months ago (2016-03-29 05:02:30 UTC) #14
raymes
lgtm
4 years, 8 months ago (2016-03-30 02:29:10 UTC) #15
lshang
+OWNER estark@, could you review changes in chrome/browser/ssl/ ? Thanks!
4 years, 8 months ago (2016-03-30 05:28:19 UTC) #17
estark
+jww, could you take a look at the chrome_ssl_host_state_delegate.cc change? Thanks!
4 years, 8 months ago (2016-03-30 18:19:14 UTC) #19
jww
lgtm, with nit. https://codereview.chromium.org/1754073002/diff/190001/chrome/browser/ssl/chrome_ssl_host_state_delegate.cc File chrome/browser/ssl/chrome_ssl_host_state_delegate.cc (right): https://codereview.chromium.org/1754073002/diff/190001/chrome/browser/ssl/chrome_ssl_host_state_delegate.cc#newcode113 chrome/browser/ssl/chrome_ssl_host_state_delegate.cc:113: if (setting.source != "preference") Should probable ...
4 years, 8 months ago (2016-03-31 18:05:31 UTC) #20
raymes
https://codereview.chromium.org/1754073002/diff/190001/chrome/browser/ssl/chrome_ssl_host_state_delegate.cc File chrome/browser/ssl/chrome_ssl_host_state_delegate.cc (right): https://codereview.chromium.org/1754073002/diff/190001/chrome/browser/ssl/chrome_ssl_host_state_delegate.cc#newcode113 chrome/browser/ssl/chrome_ssl_host_state_delegate.cc:113: if (setting.source != "preference") I think there could be ...
4 years, 8 months ago (2016-04-03 23:40:20 UTC) #21
lshang
On 2016/03/31 18:05:31, jww wrote: > lgtm, with nit. > > https://codereview.chromium.org/1754073002/diff/190001/chrome/browser/ssl/chrome_ssl_host_state_delegate.cc > File chrome/browser/ssl/chrome_ssl_host_state_delegate.cc ...
4 years, 8 months ago (2016-04-04 09:44:45 UTC) #23
jww
On 2016/04/04 09:44:45, Liu Shang wrote: > On 2016/03/31 18:05:31, jww wrote: > > lgtm, ...
4 years, 8 months ago (2016-04-04 14:15:15 UTC) #24
lshang
On 2016/04/04 14:15:15, jww wrote: > On 2016/04/04 09:44:45, Liu Shang wrote: > > On ...
4 years, 8 months ago (2016-04-05 00:27:02 UTC) #25
estark
chrome/browser/ssl lgtm
4 years, 8 months ago (2016-04-05 01:03:11 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1754073002/250001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1754073002/250001
4 years, 8 months ago (2016-04-05 03:05:35 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_TIMED_OUT, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/48194)
4 years, 8 months ago (2016-04-05 06:27:28 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1754073002/250001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1754073002/250001
4 years, 8 months ago (2016-04-05 06:31:40 UTC) #33
commit-bot: I haz the power
Committed patchset #11 (id:250001)
4 years, 8 months ago (2016-04-05 07:22:06 UTC) #35
commit-bot: I haz the power
4 years, 8 months ago (2016-04-05 07:24:25 UTC) #37
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/8bdcd7288b89a3d8cac5d64c5b948da2eb14c501
Cr-Commit-Position: refs/heads/master@{#385119}

Powered by Google App Engine
This is Rietveld 408576698