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

Issue 1855393006: [Chrome Settings UI] If User Exceptions are not allowed, prevent editing / viewing. (Closed)

Created:
4 years, 8 months ago by huangs
Modified:
4 years, 7 months ago
Reviewers:
Dan Beam, Evan Stade
CC:
chromium-reviews, dbeam+watch-options_chromium.org, michaelpg+watch-options_chromium.org, arv+watch_chromium.org, grt (UTC plus 2), Georges Khalil
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Chrome Settings UI] If User Exceptions are not allowed, prevent editing / viewing. If user exceptions are rendered useless by policy defaults (or other default providers with higher precedence), disabled them in exceptions dialog by: - Hiding all editable rows. - Removing the "Add New Exceptions" row. BUG=568031 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/ff30d12673cee058e00d6d8da59ba971f24172bb Cr-Commit-Position: refs/heads/master@{#391885}

Patch Set 1 #

Patch Set 2 : Fix refactoring bug. #

Total comments: 3

Patch Set 3 : Sync. #

Patch Set 4 : Connect with backend. #

Total comments: 2

Patch Set 5 : Fix incorrect ArrayDataModel.splice() usage. #

Total comments: 6

Patch Set 6 : Adding and using ArrayDataModel.pop(). #

Total comments: 12

Patch Set 7 : Fix JS styles. #

Total comments: 7

Patch Set 8 : Sync. #

Patch Set 9 : Making ExceptionsList.allowEdit_ a private member. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -5 lines) Patch
M chrome/browser/resources/options/content_settings.js View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/browser/resources/options/content_settings_exceptions_area.js View 1 2 3 4 5 6 7 8 4 chunks +43 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/content_settings_handler.cc View 1 2 3 5 chunks +21 lines, -3 lines 0 comments Download
M ui/webui/resources/js/cr/ui/array_data_model.js View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (10 generated)
huangs
This is sliced off from https://codereview.chromium.org/1865803002/ PTAL. Thanks!
4 years, 8 months ago (2016-04-06 18:15:14 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1855393006/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1855393006/1
4 years, 8 months ago (2016-04-06 18:16:10 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-06 19:11:47 UTC) #6
Evan Stade
I don't think it makes sense to separate this from the other CL because on ...
4 years, 8 months ago (2016-04-06 21:32:51 UTC) #7
huangs
Thanks! Will update the other CL. Closing current CL.
4 years, 8 months ago (2016-04-07 04:14:33 UTC) #8
huangs
https://codereview.chromium.org/1855393006/diff/20001/chrome/browser/resources/options/content_settings.js File chrome/browser/resources/options/content_settings.js (right): https://codereview.chromium.org/1855393006/diff/20001/chrome/browser/resources/options/content_settings.js#newcode137 chrome/browser/resources/options/content_settings.js:137: * @param {boolean} maybeEnableEdit Whether user may view/edit exceptions. ...
4 years, 8 months ago (2016-04-07 04:14:44 UTC) #9
huangs
The required data is piped through (http://crrev.com/1873343002), so resurrecting this CL now that its effects ...
4 years, 7 months ago (2016-04-25 19:33:14 UTC) #13
Evan Stade
https://codereview.chromium.org/1855393006/diff/60001/chrome/browser/resources/options/content_settings_exceptions_area.js File chrome/browser/resources/options/content_settings_exceptions_area.js (right): https://codereview.chromium.org/1855393006/diff/60001/chrome/browser/resources/options/content_settings_exceptions_area.js#newcode551 chrome/browser/resources/options/content_settings_exceptions_area.js:551: this.dataModel.splice(oldSize, oldSize, null); I tried to understand but can't ...
4 years, 7 months ago (2016-04-26 14:03:25 UTC) #14
huangs
Updated, PTAL. https://codereview.chromium.org/1855393006/diff/60001/chrome/browser/resources/options/content_settings_exceptions_area.js File chrome/browser/resources/options/content_settings_exceptions_area.js (right): https://codereview.chromium.org/1855393006/diff/60001/chrome/browser/resources/options/content_settings_exceptions_area.js#newcode551 chrome/browser/resources/options/content_settings_exceptions_area.js:551: this.dataModel.splice(oldSize, oldSize, null); I thought the params ...
4 years, 7 months ago (2016-04-26 14:39:34 UTC) #15
Evan Stade
https://codereview.chromium.org/1855393006/diff/80001/chrome/browser/resources/options/content_settings_exceptions_area.js File chrome/browser/resources/options/content_settings_exceptions_area.js (right): https://codereview.chromium.org/1855393006/diff/80001/chrome/browser/resources/options/content_settings_exceptions_area.js#newcode553 chrome/browser/resources/options/content_settings_exceptions_area.js:553: this.dataModel.splice(oldSize - 1, 1); // pop. I would be ...
4 years, 7 months ago (2016-04-26 16:05:16 UTC) #16
huangs
https://chromiumcodereview.appspot.com/1855393006/diff/80001/chrome/browser/resources/options/content_settings_exceptions_area.js File chrome/browser/resources/options/content_settings_exceptions_area.js (right): https://chromiumcodereview.appspot.com/1855393006/diff/80001/chrome/browser/resources/options/content_settings_exceptions_area.js#newcode553 chrome/browser/resources/options/content_settings_exceptions_area.js:553: this.dataModel.splice(oldSize - 1, 1); // pop. ArrayDataModel stores raw ...
4 years, 7 months ago (2016-04-26 17:37:03 UTC) #17
Evan Stade
https://chromiumcodereview.appspot.com/1855393006/diff/80001/chrome/browser/resources/options/content_settings_exceptions_area.js File chrome/browser/resources/options/content_settings_exceptions_area.js (right): https://chromiumcodereview.appspot.com/1855393006/diff/80001/chrome/browser/resources/options/content_settings_exceptions_area.js#newcode553 chrome/browser/resources/options/content_settings_exceptions_area.js:553: this.dataModel.splice(oldSize - 1, 1); // pop. On 2016/04/26 17:37:03, ...
4 years, 7 months ago (2016-04-26 22:58:09 UTC) #18
huangs
+dbeam@ for discussion: We're contemplating adding a ArrayDataModel.pop() function, rather than calling splice() directly. PTAL. ...
4 years, 7 months ago (2016-04-26 23:18:20 UTC) #20
Dan Beam
https://codereview.chromium.org/1855393006/diff/80001/chrome/browser/resources/options/content_settings_exceptions_area.js File chrome/browser/resources/options/content_settings_exceptions_area.js (right): https://codereview.chromium.org/1855393006/diff/80001/chrome/browser/resources/options/content_settings_exceptions_area.js#newcode553 chrome/browser/resources/options/content_settings_exceptions_area.js:553: this.dataModel.splice(oldSize - 1, 1); // pop. On 2016/04/26 23:18:20, ...
4 years, 7 months ago (2016-04-27 02:29:39 UTC) #21
huangs
Updated, PTAL. https://codereview.chromium.org/1855393006/diff/80001/chrome/browser/resources/options/content_settings_exceptions_area.js File chrome/browser/resources/options/content_settings_exceptions_area.js (right): https://codereview.chromium.org/1855393006/diff/80001/chrome/browser/resources/options/content_settings_exceptions_area.js#newcode553 chrome/browser/resources/options/content_settings_exceptions_area.js:553: this.dataModel.splice(oldSize - 1, 1); // pop. Added ...
4 years, 7 months ago (2016-04-27 14:28:01 UTC) #22
Dan Beam
https://codereview.chromium.org/1855393006/diff/100001/chrome/browser/resources/options/content_settings_exceptions_area.js File chrome/browser/resources/options/content_settings_exceptions_area.js (right): https://codereview.chromium.org/1855393006/diff/100001/chrome/browser/resources/options/content_settings_exceptions_area.js#newcode549 chrome/browser/resources/options/content_settings_exceptions_area.js:549: var oldSize = this.dataModel.length; unused https://codereview.chromium.org/1855393006/diff/100001/chrome/browser/resources/options/content_settings_exceptions_area.js#newcode552 chrome/browser/resources/options/content_settings_exceptions_area.js:552: } else ...
4 years, 7 months ago (2016-04-27 21:47:27 UTC) #23
huangs
Thanks! Updated. https://chromiumcodereview.appspot.com/1855393006/diff/100001/chrome/browser/resources/options/content_settings_exceptions_area.js File chrome/browser/resources/options/content_settings_exceptions_area.js (right): https://chromiumcodereview.appspot.com/1855393006/diff/100001/chrome/browser/resources/options/content_settings_exceptions_area.js#newcode549 chrome/browser/resources/options/content_settings_exceptions_area.js:549: var oldSize = this.dataModel.length; On 2016/04/27 21:47:27, ...
4 years, 7 months ago (2016-04-27 21:53:13 UTC) #24
huangs
Ping for review, PTAL.
4 years, 7 months ago (2016-04-29 14:22:52 UTC) #25
huangs
Changing plans: Instead of prevent editing, I'll just gray out the items and display the ...
4 years, 7 months ago (2016-05-02 14:50:19 UTC) #26
Dan Beam
https://codereview.chromium.org/1855393006/diff/120001/chrome/browser/resources/options/content_settings.js File chrome/browser/resources/options/content_settings.js (right): https://codereview.chromium.org/1855393006/diff/120001/chrome/browser/resources/options/content_settings.js#newcode137 chrome/browser/resources/options/content_settings.js:137: * @param {boolean} allowUserExceptions Whether user may set exceptions. ...
4 years, 7 months ago (2016-05-03 04:20:26 UTC) #27
huangs
Addressed the bug, have not done the graying part yet. https://codereview.chromium.org/1855393006/diff/120001/chrome/browser/resources/options/content_settings.js File chrome/browser/resources/options/content_settings.js (right): https://codereview.chromium.org/1855393006/diff/120001/chrome/browser/resources/options/content_settings.js#newcode137 ...
4 years, 7 months ago (2016-05-03 18:34:19 UTC) #29
Dan Beam
lgtm https://codereview.chromium.org/1855393006/diff/120001/chrome/browser/resources/options/content_settings.js File chrome/browser/resources/options/content_settings.js (right): https://codereview.chromium.org/1855393006/diff/120001/chrome/browser/resources/options/content_settings.js#newcode137 chrome/browser/resources/options/content_settings.js:137: * @param {boolean} allowUserExceptions Whether user may set ...
4 years, 7 months ago (2016-05-04 01:44:42 UTC) #30
huangs
Ah okay, thanks for the tip re. closure_compilation! I'm planning to abandon the current approach ...
4 years, 7 months ago (2016-05-04 03:15:46 UTC) #31
huangs
Decided: Going with current approach of hiding the user exception list. Showing user's list in ...
4 years, 7 months ago (2016-05-05 18:13:10 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1855393006/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1855393006/160001
4 years, 7 months ago (2016-05-05 18:13:55 UTC) #34
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 7 months ago (2016-05-05 20:05:50 UTC) #35
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/ff30d12673cee058e00d6d8da59ba971f24172bb Cr-Commit-Position: refs/heads/master@{#391885}
4 years, 7 months ago (2016-05-05 20:07:14 UTC) #37
huangs
4 years, 7 months ago (2016-05-09 21:37:12 UTC) #38
Message was sent while issue was closed.
A revert of this CL (patchset #9 id:160001) has been created in
https://chromiumcodereview.appspot.com/1962163002/ by huangs@chromium.org.

The reason for reverting is: Reverting since this is causing
http://crbug.com/609725 .  Problem is that we're hiding all "non-editable"
entries in exception lists.  However, the list is sometimes used for read-only
data, e.g., Zoom Level.  Will need to modify the logic in a follow-up..

Powered by Google App Engine
This is Rietveld 408576698