DescriptionReplace HostContentSettingsMap::AddExceptionForURL with SetNarrowestWebsiteSetting
Both SetNarrowestWebsiteSetting and AddExceptionForURL are used for the same
purpose although they do slightly different things. They get called when a user
changes a content setting via a content settings page action icon or via the
origin info bubble. The aim is to ensure that the user's setting gets changed
even if there is an existing setting which takes precedence over the default
scoping of the setting they are changing. AddExceptionForURL handles this by
deleting the most narrow setting and setting the new setting.
SetNarrowestWebsiteSetting achieves this by changing the most narrow setting.
The behavior should be consistent for these two UI actions anyway and
SetNarrowestWebsiteSetting seemed to be the most sensible behavior because it
won't delete any exceptions the user may have created.
Note that this function will not be needed at all when all settings are scoped
to origin scope by default. There is no pattern that is more narrow than origin
scope so when that is the case we can call SetContentSetting directly.
BUG=551747
Committed: https://crrev.com/fbaaaaac87cc7a4dc64062d61f2f0c4a123a4c96
Cr-Commit-Position: refs/heads/master@{#358755}
Patch Set 1 #Patch Set 2 : #
Total comments: 1
Patch Set 3 : #
Total comments: 6
Patch Set 4 : #
Messages
Total messages: 22 (7 generated)
|