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

Issue 1818843002: Rename SetContentSetting() to SetContentSettingCustomScope() (Closed)

Created:
4 years, 9 months ago by lshang
Modified:
4 years, 8 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, msramek+watch_chromium.org, michaelpg+watch-options_chromium.org, Peter Beverloo, mlamouri+watch-notifications_chromium.org, jam, raymes+watch_chromium.org, mvanouwerkerk+watch_chromium.org, mlamouri+watch-permissions_chromium.org, markusheintz_, harkness+watch_chromium.org, johnme+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

Rename SetContentSetting() to SetContentSettingCustomScope() We made a SetContentSettingDefaultScope() which takes GURLs directly and generate patterns inside of the method. This is what most developers will want to use when setting content settings. The original SetContentSetting(), which takes patterns, is renamed to SetContentSettingCustomScope() to make it more clear to developers. This method is only used for custom-scoped setting in tests or special cases. To rename it, first use command: grep -rl 'SetContentSetting(' ./* | xargs sed -i 's/SetContentSetting(/SetContentSettingcustomScope(/g' to find out all the call sites of SetContentSetting() and rename them. Then give a review of each case and minor changes are made to fix few exceptions. BUG=551747 TBR= mlamouri@chromium.org, peter@chromium.org, miu@chromium.org Committed: https://crrev.com/21436c16b59a70f1b41b1c3571981f8420d83d8e Cr-Commit-Position: refs/heads/master@{#385636}

Patch Set 1 #

Patch Set 2 : fix comment alignment #

Total comments: 4

Patch Set 3 : change two cases to use SetDefaultContentSetting #

Total comments: 1

Patch Set 4 : rebase #

Patch Set 5 : some more change after rebase #

Total comments: 2

Patch Set 6 : minor change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -57 lines) Patch
M chrome/browser/android/preferences/pref_service_bridge.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/notifications/message_center_settings_controller.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/permissions/permission_manager_unittest.cc View 1 2 3 1 chunk +2 lines, -6 lines 0 comments Download
M chrome/browser/plugins/plugin_info_message_filter_unittest.cc View 1 chunk +3 lines, -5 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_browsertest.cc View 1 2 3 1 chunk +7 lines, -8 lines 0 comments Download
M chrome/browser/ui/exclusive_access/fullscreen_controller.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/content_settings_handler.cc View 1 2 3 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/plugins/plugins_handler.cc View 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/settings/site_settings_handler.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M components/content_settings/core/browser/cookie_settings_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M components/content_settings/core/browser/host_content_settings_map.h View 1 2 3 2 chunks +10 lines, -9 lines 0 comments Download
M components/content_settings/core/browser/host_content_settings_map.cc View 1 2 3 4 3 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 25 (11 generated)
lshang
Hi raymes, this CL renames SetContentSetting() to SetContentSettingCustomScope() and lists all the exceptions that can ...
4 years, 9 months ago (2016-03-21 04:37:38 UTC) #4
raymes
This looks really good!! https://codereview.chromium.org/1818843002/diff/20001/chrome/browser/permissions/permission_manager_unittest.cc File chrome/browser/permissions/permission_manager_unittest.cc (right): https://codereview.chromium.org/1818843002/diff/20001/chrome/browser/permissions/permission_manager_unittest.cc#newcode219 chrome/browser/permissions/permission_manager_unittest.cc:219: GetHostContentSettingsMap()->SetContentSettingCustomScope( I think we could ...
4 years, 9 months ago (2016-03-21 06:07:20 UTC) #5
lshang
https://codereview.chromium.org/1818843002/diff/20001/chrome/browser/permissions/permission_manager_unittest.cc File chrome/browser/permissions/permission_manager_unittest.cc (right): https://codereview.chromium.org/1818843002/diff/20001/chrome/browser/permissions/permission_manager_unittest.cc#newcode219 chrome/browser/permissions/permission_manager_unittest.cc:219: GetHostContentSettingsMap()->SetContentSettingCustomScope( On 2016/03/21 06:07:20, raymes wrote: > I think ...
4 years, 9 months ago (2016-03-22 01:26:54 UTC) #6
raymes
lgtm https://codereview.chromium.org/1818843002/diff/40001/chrome/browser/ui/exclusive_access/fullscreen_controller.cc File chrome/browser/ui/exclusive_access/fullscreen_controller.cc (right): https://codereview.chromium.org/1818843002/diff/40001/chrome/browser/ui/exclusive_access/fullscreen_controller.cc#newcode509 chrome/browser/ui/exclusive_access/fullscreen_controller.cc:509: // the nit: fill 80 chars
4 years, 9 months ago (2016-03-22 05:40:13 UTC) #7
lshang
Hi Raymes, some more changes are made due to trunk update in these days. Can ...
4 years, 8 months ago (2016-04-06 00:03:21 UTC) #9
raymes
lgtm but still with a nit I think :) https://codereview.chromium.org/1818843002/diff/80001/chrome/browser/ui/exclusive_access/fullscreen_controller.cc File chrome/browser/ui/exclusive_access/fullscreen_controller.cc (right): https://codereview.chromium.org/1818843002/diff/80001/chrome/browser/ui/exclusive_access/fullscreen_controller.cc#newcode509 chrome/browser/ui/exclusive_access/fullscreen_controller.cc:509: ...
4 years, 8 months ago (2016-04-06 06:02:41 UTC) #10
lshang
https://codereview.chromium.org/1818843002/diff/80001/chrome/browser/ui/exclusive_access/fullscreen_controller.cc File chrome/browser/ui/exclusive_access/fullscreen_controller.cc (right): https://codereview.chromium.org/1818843002/diff/80001/chrome/browser/ui/exclusive_access/fullscreen_controller.cc#newcode509 chrome/browser/ui/exclusive_access/fullscreen_controller.cc:509: // the On 2016/04/06 06:02:40, raymes wrote: > nit: ...
4 years, 8 months ago (2016-04-06 10:44:23 UTC) #11
lshang
+OWNER @bauerb: please review changes in c/b/android/ c/b/plugins/ c/b/ui/webui/ @peter: please review changes in c/b/notifications/ ...
4 years, 8 months ago (2016-04-06 10:59:17 UTC) #13
johnme
c/b/permissions/ lgtm
4 years, 8 months ago (2016-04-06 12:45:08 UTC) #14
johnme
On 2016/04/06 12:45:08, johnme wrote: > c/b/permissions/ lgtm Oops, I mean c/b/push_messaging/ lgtm!
4 years, 8 months ago (2016-04-06 12:45:34 UTC) #15
Bernhard Bauer
LGTM FWIW, you can actually TBR OWNERS where you are just updating call sites, if ...
4 years, 8 months ago (2016-04-06 14:34:48 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1818843002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1818843002/100001
4 years, 8 months ago (2016-04-07 01:20:20 UTC) #21
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 8 months ago (2016-04-07 02:59:25 UTC) #23
commit-bot: I haz the power
4 years, 8 months ago (2016-04-07 03:01:35 UTC) #25
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/21436c16b59a70f1b41b1c3571981f8420d83d8e
Cr-Commit-Position: refs/heads/master@{#385636}

Powered by Google App Engine
This is Rietveld 408576698