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

Issue 1417023007: Replace HostContentSettingsMap::AddExceptionForURL with SetNarrowestWebsiteSetting (Closed)

Created:
5 years, 1 month ago by raymes
Modified:
5 years, 1 month ago
Reviewers:
Bernhard Bauer, msw, lshang
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@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace 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 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -109 lines) Patch
M chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/content_settings/content_setting_bubble_model.cc View 1 2 3 3 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/ui/website_settings/website_settings.cc View 1 1 chunk +2 lines, -41 lines 0 comments Download
M components/content_settings/core/browser/host_content_settings_map.h View 1 2 3 1 chunk +9 lines, -18 lines 0 comments Download
M components/content_settings/core/browser/host_content_settings_map.cc View 1 2 chunks +52 lines, -40 lines 0 comments Download

Messages

Total messages: 22 (7 generated)
raymes
5 years, 1 month ago (2015-11-05 05:48:15 UTC) #2
raymes
Actually, please don't review this yet, I realised there is a different approach I should ...
5 years, 1 month ago (2015-11-05 06:06:45 UTC) #3
raymes
I've updated the CL and description, PTAL :) https://codereview.chromium.org/1417023007/diff/20001/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/1417023007/diff/20001/components/content_settings/core/browser/host_content_settings_map.h#newcode160 components/content_settings/core/browser/host_content_settings_map.h:160: void ...
5 years, 1 month ago (2015-11-05 06:42:28 UTC) #5
Bernhard Bauer
lgtm https://codereview.chromium.org/1417023007/diff/40001/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/1417023007/diff/40001/components/content_settings/core/browser/host_content_settings_map.h#newcode157 components/content_settings/core/browser/host_content_settings_map.h:157: // are scoped to origin scope. There is ...
5 years, 1 month ago (2015-11-05 11:28:10 UTC) #6
lshang
lgtm
5 years, 1 month ago (2015-11-05 23:14:21 UTC) #7
raymes
https://codereview.chromium.org/1417023007/diff/40001/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/1417023007/diff/40001/components/content_settings/core/browser/host_content_settings_map.h#newcode157 components/content_settings/core/browser/host_content_settings_map.h:157: // are scoped to origin scope. There is no ...
5 years, 1 month ago (2015-11-08 23:44:44 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1417023007/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1417023007/40001
5 years, 1 month ago (2015-11-08 23:47:43 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/116642)
5 years, 1 month ago (2015-11-08 23:55:17 UTC) #12
raymes
+msw for chrome/browser/ui/* OWNERS
5 years, 1 month ago (2015-11-08 23:57:48 UTC) #14
msw
https://codereview.chromium.org/1417023007/diff/40001/chrome/browser/ui/content_settings/content_setting_bubble_model.cc File chrome/browser/ui/content_settings/content_setting_bubble_model.cc (right): https://codereview.chromium.org/1417023007/diff/40001/chrome/browser/ui/content_settings/content_setting_bubble_model.cc#newcode417 chrome/browser/ui/content_settings/content_setting_bubble_model.cc:417: void ContentSettingSingleRadioGroup::AddException(ContentSetting setting) { nit: rename AddException to match ...
5 years, 1 month ago (2015-11-09 18:41:56 UTC) #15
raymes
https://codereview.chromium.org/1417023007/diff/40001/chrome/browser/ui/content_settings/content_setting_bubble_model.cc File chrome/browser/ui/content_settings/content_setting_bubble_model.cc (right): https://codereview.chromium.org/1417023007/diff/40001/chrome/browser/ui/content_settings/content_setting_bubble_model.cc#newcode417 chrome/browser/ui/content_settings/content_setting_bubble_model.cc:417: void ContentSettingSingleRadioGroup::AddException(ContentSetting setting) { On 2015/11/09 18:41:56, msw wrote: ...
5 years, 1 month ago (2015-11-09 23:29:02 UTC) #16
msw
lgtm
5 years, 1 month ago (2015-11-09 23:39:09 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1417023007/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1417023007/60001
5 years, 1 month ago (2015-11-10 00:49:59 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 1 month ago (2015-11-10 02:20:49 UTC) #21
commit-bot: I haz the power
5 years, 1 month ago (2015-11-10 02:21:52 UTC) #22
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/fbaaaaac87cc7a4dc64062d61f2f0c4a123a4c96
Cr-Commit-Position: refs/heads/master@{#358755}

Powered by Google App Engine
This is Rietveld 408576698