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

Issue 2936003003: MD Settings: Set all content setting values in Site Details Javascript. (Closed)

Created:
3 years, 6 months ago by Patti Lor
Modified:
3 years, 5 months ago
CC:
chromium-reviews, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, dbeam+watch-settings_chromium.org, stevenjb+watch-md-settings_chromium.org, arv+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

MD Settings: Set all content setting values in the <site-details> object. r476514 changed the "Site Details" page to show all content settings instead of the non-default ones. However, the back-end code supporting this UI still only retrieved non-default settings. This CL fixes this problem to retrieve the correct values for all content settings displayed, consistent with those shown in the Page Info bubble. Note that the "Site Details" UI will now only show the correct content setting value for content settings that are non-default (previously, they were all incorrect). A follow-up CL will be required to enable the UI to show default settings, such as "Ask (default)", "Allow (default)" or "Block (default)" values. Insecure (http) origins will also show that certain permissions have been blocked, unlike the Page Info bubble. See https://codereview.chromium.org/2946393002/ for C++ tests. BUG=656758 TEST=With #enable-site-details turned on, navigate to https://permission.site. Allow and deny a few permissions and verify these changes show up in the Page Info bubble. Then click "Site settings" in the Page Info bubble, and check the non-default 'Allow'- / 'Block'- ed content settings are also shown in the "Site Details" page for https://permission.site and match the non-default values shown in the Page Info bubble. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2936003003 Cr-Commit-Position: refs/heads/master@{#483614} Committed: https://chromium.googlesource.com/chromium/src/+/f3b6e00fe2826406218b15bd2f317cfebe835696

Patch Set 1 #

Patch Set 2 : Remove dependency on Page Info UI code and introduce new logic to retrieve content settings. #

Total comments: 8

Patch Set 3 : Review comments, tests & cleanup. #

Total comments: 16

Patch Set 4 : More comments and fixes. #

Patch Set 5 : Fix last reference to |site| in site_details.html. #

Total comments: 16

Patch Set 6 : Review comments. #

Total comments: 4

Patch Set 7 : Switch content setting source logic to if statements. #

Total comments: 6

Patch Set 8 : Review comments. #

Total comments: 9

Patch Set 9 : Convert getCategoryPermissionForOrigin to getOriginPermissions #

Total comments: 4

Patch Set 10 : Fix some closure type declarations. #

Patch Set 11 : Remove embeddingDisplayName. #

Total comments: 9

Patch Set 12 : Review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+293 lines, -176 lines) Patch
M chrome/browser/resources/settings/site_settings/site_details.html View 1 2 3 4 2 chunks +16 lines, -18 lines 0 comments Download
M chrome/browser/resources/settings/site_settings/site_details.js View 1 2 3 4 5 6 7 8 9 6 chunks +34 lines, -22 lines 0 comments Download
M chrome/browser/resources/settings/site_settings/site_details_permission.js View 1 2 3 1 chunk +2 lines, -12 lines 0 comments Download
M chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js View 1 2 3 4 5 6 7 8 9 10 5 chunks +17 lines, -13 lines 0 comments Download
M chrome/browser/ui/webui/settings/site_settings_handler.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/settings/site_settings_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 11 chunks +133 lines, -77 lines 0 comments Download
M chrome/browser/ui/webui/site_settings_helper.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/site_settings_helper.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/webui/settings/site_details_permission_tests.js View 1 2 3 4 5 2 chunks +15 lines, -22 lines 0 comments Download
M chrome/test/data/webui/settings/site_details_tests.js View 1 2 3 4 5 6 7 8 3 chunks +22 lines, -9 lines 0 comments Download
M chrome/test/data/webui/settings/test_site_settings_prefs_browser_proxy.js 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: 87 (63 generated)
Patti Lor
Hi Raymes and Tim, PTAL? I still need to add/fix tests and probably do a ...
3 years, 6 months ago (2017-06-16 00:39:14 UTC) #12
tsergeant
https://codereview.chromium.org/2936003003/diff/20001/chrome/browser/resources/settings/site_settings/site_details.js File chrome/browser/resources/settings/site_settings/site_details.js (right): https://codereview.chromium.org/2936003003/diff/20001/chrome/browser/resources/settings/site_settings/site_details.js#newcode71 chrome/browser/resources/settings/site_settings/site_details.js:71: if (this.origin === undefined) This check shouldn't be necessary ...
3 years, 6 months ago (2017-06-16 03:11:40 UTC) #13
raymes
Looking good https://codereview.chromium.org/2936003003/diff/40001/chrome/browser/resources/settings/site_settings/site_details.js File chrome/browser/resources/settings/site_settings/site_details.js (left): https://codereview.chromium.org/2936003003/diff/40001/chrome/browser/resources/settings/site_settings/site_details.js#oldcode20 chrome/browser/resources/settings/site_settings/site_details.js:20: site: { site looks like it may ...
3 years, 6 months ago (2017-06-19 04:13:12 UTC) #18
Patti Lor
Thanks Raymes and Tim, PTAL. I added one new JS test and amended existing ones ...
3 years, 6 months ago (2017-06-20 08:25:55 UTC) #25
raymes
lgtm with some small suggestions https://codereview.chromium.org/2936003003/diff/40001/chrome/browser/ui/webui/settings/site_settings_handler.cc File chrome/browser/ui/webui/settings/site_settings_handler.cc (right): https://codereview.chromium.org/2936003003/diff/40001/chrome/browser/ui/webui/settings/site_settings_handler.cc#newcode598 chrome/browser/ui/webui/settings/site_settings_handler.cc:598: auto raw_site_exception = base::MakeUnique<base::DictionaryValue>(); ...
3 years, 6 months ago (2017-06-20 23:42:36 UTC) #26
tsergeant
Generally looks good! Just a couple of test fixes https://codereview.chromium.org/2936003003/diff/80001/chrome/browser/resources/settings/site_settings/site_details.js File chrome/browser/resources/settings/site_settings/site_details.js (right): https://codereview.chromium.org/2936003003/diff/80001/chrome/browser/resources/settings/site_settings/site_details.js#newcode74 chrome/browser/resources/settings/site_settings/site_details.js:74: ...
3 years, 6 months ago (2017-06-21 01:49:57 UTC) #27
Patti Lor
Hey Raymes, can you take another look at the ConvertContentSettingSourceToString() logic in chrome/browser/ui/webui/settings/site_settings_handler.cc? Thanks both ...
3 years, 6 months ago (2017-06-21 06:36:37 UTC) #32
tsergeant
lgtm! https://codereview.chromium.org/2936003003/diff/80001/chrome/browser/resources/settings/site_settings/site_details.js File chrome/browser/resources/settings/site_settings/site_details.js (right): https://codereview.chromium.org/2936003003/diff/80001/chrome/browser/resources/settings/site_settings/site_details.js#newcode74 chrome/browser/resources/settings/site_settings/site_details.js:74: .forEach(function(element) { On 2017/06/21 06:36:37, Patti Lor wrote: ...
3 years, 6 months ago (2017-06-21 06:52:10 UTC) #33
raymes
https://codereview.chromium.org/2936003003/diff/80001/chrome/browser/ui/webui/settings/site_settings_handler.cc File chrome/browser/ui/webui/settings/site_settings_handler.cc (right): https://codereview.chromium.org/2936003003/diff/80001/chrome/browser/ui/webui/settings/site_settings_handler.cc#newcode128 chrome/browser/ui/webui/settings/site_settings_handler.cc:128: // These are not possible. On 2017/06/21 06:36:37, Patti ...
3 years, 6 months ago (2017-06-22 00:07:03 UTC) #34
Patti Lor
https://codereview.chromium.org/2936003003/diff/80001/chrome/browser/resources/settings/site_settings/site_details.js File chrome/browser/resources/settings/site_settings/site_details.js (right): https://codereview.chromium.org/2936003003/diff/80001/chrome/browser/resources/settings/site_settings/site_details.js#newcode74 chrome/browser/resources/settings/site_settings/site_details.js:74: .forEach(function(element) { On 2017/06/21 06:52:10, tsergeant wrote: > On ...
3 years, 6 months ago (2017-06-22 05:32:00 UTC) #39
raymes
lgtm, thanks! https://codereview.chromium.org/2936003003/diff/120001/chrome/browser/ui/webui/settings/site_settings_handler.cc File chrome/browser/ui/webui/settings/site_settings_handler.cc (right): https://codereview.chromium.org/2936003003/diff/120001/chrome/browser/ui/webui/settings/site_settings_handler.cc#newcode124 chrome/browser/ui/webui/settings/site_settings_handler.cc:124: content_settings_source == content_settings::SETTING_SOURCE_SUPERVISED) nit: add {} https://codereview.chromium.org/2936003003/diff/120001/chrome/browser/ui/webui/settings/site_settings_handler.cc#newcode130 ...
3 years, 6 months ago (2017-06-22 06:50:35 UTC) #40
Patti Lor
Thanks Raymes! dschuyler@, PTAL? https://codereview.chromium.org/2936003003/diff/120001/chrome/browser/ui/webui/settings/site_settings_handler.cc File chrome/browser/ui/webui/settings/site_settings_handler.cc (right): https://codereview.chromium.org/2936003003/diff/120001/chrome/browser/ui/webui/settings/site_settings_handler.cc#newcode124 chrome/browser/ui/webui/settings/site_settings_handler.cc:124: content_settings_source == content_settings::SETTING_SOURCE_SUPERVISED) On 2017/06/22 ...
3 years, 6 months ago (2017-06-23 00:41:34 UTC) #46
dschuyler
On 2017/06/23 00:41:34, Patti Lor wrote: > Thanks Raymes! dschuyler@, PTAL? > > https://codereview.chromium.org/2936003003/diff/120001/chrome/browser/ui/webui/settings/site_settings_handler.cc > ...
3 years, 6 months ago (2017-06-23 22:01:19 UTC) #47
dschuyler
https://codereview.chromium.org/2936003003/diff/140001/chrome/browser/resources/settings/site_settings/site_details.html File chrome/browser/resources/settings/site_settings/site_details.html (right): https://codereview.chromium.org/2936003003/diff/140001/chrome/browser/resources/settings/site_settings/site_details.html#newcode44 chrome/browser/resources/settings/site_settings/site_details.html:44: <!-- TODO(patricialor): This should show the origin's display name. ...
3 years, 5 months ago (2017-06-26 22:07:05 UTC) #48
Patti Lor
Thanks for your review dschuyler, PTAL! https://codereview.chromium.org/2936003003/diff/140001/chrome/browser/resources/settings/site_settings/site_details.html File chrome/browser/resources/settings/site_settings/site_details.html (right): https://codereview.chromium.org/2936003003/diff/140001/chrome/browser/resources/settings/site_settings/site_details.html#newcode44 chrome/browser/resources/settings/site_settings/site_details.html:44: <!-- TODO(patricialor): This ...
3 years, 5 months ago (2017-06-28 09:12:52 UTC) #56
dschuyler
If it's really closure compiling, LGTM. https://codereview.chromium.org/2936003003/diff/140001/chrome/browser/resources/settings/site_settings/site_details.js File chrome/browser/resources/settings/site_settings/site_details.js (right): https://codereview.chromium.org/2936003003/diff/140001/chrome/browser/resources/settings/site_settings/site_details.js#newcode128 chrome/browser/resources/settings/site_settings/site_details.js:128: }); On 2017/06/28 ...
3 years, 5 months ago (2017-06-28 23:55:53 UTC) #59
Patti Lor
Thanks dschuyler! calamity, PTAL for owners review of: chrome/browser/ui/webui/site_settings_helper.h chrome/browser/ui/webui/site_settings_helper.cc https://codereview.chromium.org/2936003003/diff/180001/chrome/browser/resources/settings/site_settings/site_details.js File chrome/browser/resources/settings/site_settings/site_details.js (right): https://codereview.chromium.org/2936003003/diff/180001/chrome/browser/resources/settings/site_settings/site_details.js#newcode73 ...
3 years, 5 months ago (2017-06-29 02:11:07 UTC) #65
calamity
https://codereview.chromium.org/2936003003/diff/220001/chrome/browser/ui/webui/settings/site_settings_handler.cc File chrome/browser/ui/webui/settings/site_settings_handler.cc (right): https://codereview.chromium.org/2936003003/diff/220001/chrome/browser/ui/webui/settings/site_settings_handler.cc#newcode541 chrome/browser/ui/webui/settings/site_settings_handler.cc:541: void SiteSettingsHandler::HandleGetOriginPermissions( The real version of this doesn't seem ...
3 years, 5 months ago (2017-06-29 05:31:26 UTC) #68
tsergeant
https://codereview.chromium.org/2936003003/diff/220001/chrome/browser/ui/webui/settings/site_settings_handler.cc File chrome/browser/ui/webui/settings/site_settings_handler.cc (right): https://codereview.chromium.org/2936003003/diff/220001/chrome/browser/ui/webui/settings/site_settings_handler.cc#newcode541 chrome/browser/ui/webui/settings/site_settings_handler.cc:541: void SiteSettingsHandler::HandleGetOriginPermissions( On 2017/06/29 05:31:26, calamity wrote: > The ...
3 years, 5 months ago (2017-06-29 07:14:48 UTC) #69
tsergeant
3 years, 5 months ago (2017-06-29 07:14:50 UTC) #70
Patti Lor
https://codereview.chromium.org/2936003003/diff/220001/chrome/browser/ui/webui/settings/site_settings_handler.cc File chrome/browser/ui/webui/settings/site_settings_handler.cc (right): https://codereview.chromium.org/2936003003/diff/220001/chrome/browser/ui/webui/settings/site_settings_handler.cc#newcode541 chrome/browser/ui/webui/settings/site_settings_handler.cc:541: void SiteSettingsHandler::HandleGetOriginPermissions( On 2017/06/29 07:14:48, tsergeant wrote: > On ...
3 years, 5 months ago (2017-06-30 01:40:33 UTC) #80
calamity
lgtm
3 years, 5 months ago (2017-06-30 03:11:35 UTC) #81
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2936003003/240001
3 years, 5 months ago (2017-06-30 03:14:00 UTC) #84
commit-bot: I haz the power
3 years, 5 months ago (2017-06-30 03:19:55 UTC) #87
Message was sent while issue was closed.
Committed patchset #12 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/f3b6e00fe2826406218b15bd2f31...

Powered by Google App Engine
This is Rietveld 408576698