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

Issue 1686343002: Change HostContentSettingsMap::SetContentSetting to use GURLs instead of patterns (Closed)

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

Description

Change HostContentSettingsMap::SetContentSetting to use GURLs instead of patterns A new version of SetContentSetting which takes GURLs as parameters. The patterns are determined by WebsiteSettingsInfo::ScopingType from the ContentSettingsType. Developers can directly pass in GURLs to decrease errors and inconsistency. Will incrementally change all the callsites of SetContentSetting to use the new version in the following CLs. BUG=551747 Committed: https://crrev.com/48657c27ec55dc003cdad3e2472db8a3553ab3c4 Cr-Commit-Position: refs/heads/master@{#378960}

Patch Set 1 #

Patch Set 2 : extract GetPatternsFromScopingType() to get patterns from scoping types #

Patch Set 3 : add SetContentSettingCustomScope #

Patch Set 4 : change to use primary_url and secondary_url #

Patch Set 5 : fix trybot bugs #

Patch Set 6 : change to host_content_settings_map #

Patch Set 7 : add migrate method #

Total comments: 4

Patch Set 8 : divide the CL and change to use DefaultScope in unit tests #

Total comments: 5

Patch Set 9 : address review comments #

Total comments: 2

Patch Set 10 : minor change in comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -295 lines) Patch
M chrome/browser/content_settings/content_settings_usages_state_unittest.cc View 1 2 2 chunks +15 lines, -30 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map_unittest.cc View 1 2 3 4 5 6 7 30 chunks +103 lines, -234 lines 0 comments Download
M components/content_settings/core/browser/host_content_settings_map.h View 1 2 3 4 5 6 7 8 9 1 chunk +24 lines, -3 lines 0 comments Download
M components/content_settings/core/browser/host_content_settings_map.cc View 1 2 3 4 5 6 7 8 4 chunks +56 lines, -28 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 25 (14 generated)
lshang
PTAL thanks!
4 years, 10 months ago (2016-02-15 06:00:15 UTC) #6
lshang
Hi Raymes, this is the up-to-date patch which includes GetPatternsFromScopingType() and MigrateOldSetting(). PTAL thanks!
4 years, 9 months ago (2016-03-01 02:51:53 UTC) #12
raymes
Hey Liu, Could we split this up into several patches? -One adding the new SetContentSettingsDefaultScope ...
4 years, 9 months ago (2016-03-01 06:17:32 UTC) #13
lshang
Raymes, I moved MigrateOldSettings() to a separate CL(which is here: https://codereview.chromium.org/1754073002/) and also moved changes ...
4 years, 9 months ago (2016-03-02 04:02:28 UTC) #14
raymes
Thanks Liu! Looks good, just a couple of comments https://codereview.chromium.org/1686343002/diff/280001/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/1686343002/diff/280001/components/content_settings/core/browser/host_content_settings_map.cc#newcode111 components/content_settings/core/browser/host_content_settings_map.cc:111: ...
4 years, 9 months ago (2016-03-02 04:22:52 UTC) #15
lshang
https://codereview.chromium.org/1686343002/diff/280001/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/1686343002/diff/280001/components/content_settings/core/browser/host_content_settings_map.cc#newcode111 components/content_settings/core/browser/host_content_settings_map.cc:111: struct PatternPair { On 2016/03/02 04:22:51, raymes wrote: > ...
4 years, 9 months ago (2016-03-02 05:21:57 UTC) #16
raymes
lgtm https://codereview.chromium.org/1686343002/diff/300001/components/content_settings/core/browser/host_content_settings_map.h File components/content_settings/core/browser/host_content_settings_map.h (right): https://codereview.chromium.org/1686343002/diff/300001/components/content_settings/core/browser/host_content_settings_map.h#newcode138 components/content_settings/core/browser/host_content_settings_map.h:138: // Unless adding a custom-scoped setting, most developers ...
4 years, 9 months ago (2016-03-03 01:38:19 UTC) #17
lshang
Thanks Raymes! https://codereview.chromium.org/1686343002/diff/300001/components/content_settings/core/browser/host_content_settings_map.h File components/content_settings/core/browser/host_content_settings_map.h (right): https://codereview.chromium.org/1686343002/diff/300001/components/content_settings/core/browser/host_content_settings_map.h#newcode138 components/content_settings/core/browser/host_content_settings_map.h:138: // Unless adding a custom-scoped setting, most ...
4 years, 9 months ago (2016-03-03 03:03:42 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1686343002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1686343002/320001
4 years, 9 months ago (2016-03-03 04:59:07 UTC) #21
commit-bot: I haz the power
Committed patchset #10 (id:320001)
4 years, 9 months ago (2016-03-03 05:08:17 UTC) #23
commit-bot: I haz the power
4 years, 9 months ago (2016-03-03 05:09:41 UTC) #25
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/48657c27ec55dc003cdad3e2472db8a3553ab3c4
Cr-Commit-Position: refs/heads/master@{#378960}

Powered by Google App Engine
This is Rietveld 408576698