|
|
Created:
3 years, 7 months ago by dschuyler Modified:
3 years, 7 months ago Reviewers:
dpapad CC:
arv+watch_chromium.org, chromium-reviews, dbeam+watch-settings_chromium.org, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, stevenjb+watch-md-settings_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
Description[MD settings] content exceptions with embeddingOrigin as read-only
This CL makes content settings exceptions that have an embeddingOrigin
read-only. That means they may be removed (deleted), but they cannot be
edited (not even changing the category).
BUG=716687
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Review-Url: https://codereview.chromium.org/2868223002
Cr-Commit-Position: refs/heads/master@{#472297}
Committed: https://chromium.googlesource.com/chromium/src/+/ad2fac2570c69d70b459d284aa469feab9928dbe
Patch Set 1 : unit tests #
Total comments: 10
Patch Set 2 : review changes #
Messages
Total messages: 32 (24 generated)
Description was changed from ========== [MD settings] content exceptions with embeddingOrigin as read-only This CL makes content settings exceptions that have an embeddingOrigin read-only. That means they may be removed (deleted), but they cannot be edited (not even changing the category). BUG=716687 ========== to ========== [MD settings] content exceptions with embeddingOrigin as read-only This CL makes content settings exceptions that have an embeddingOrigin read-only. That means they may be removed (deleted), but they cannot be edited (not even changing the category). BUG=716687 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
The CQ bit was checked by dschuyler@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by dschuyler@chromium.org to run a CQ dry run
Patchset #1 (id:1) has been deleted
dschuyler@chromium.org changed reviewers: + dpapad@chromium.org
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2868223002/diff/20001/chrome/browser/resource... File chrome/browser/resources/settings/site_settings/site_list.html (right): https://codereview.chromium.org/2868223002/diff/20001/chrome/browser/resource... chrome/browser/resources/settings/site_settings/site_list.html:96: item.enforcement, readOnlyList, item)]]" It seems a bit redundant that we pass |item.enforcement| as the 1st arg, and then we pass the entire |item| as the 3rd arg. Can we do either of the following? isResetButtonHidden_(item, readOnlyList) OR isResetButtonHidden_(item.enforcement, readOnlyList, item.embeddingOrigin) https://codereview.chromium.org/2868223002/diff/20001/chrome/browser/resource... File chrome/browser/resources/settings/site_settings/site_list.js (right): https://codereview.chromium.org/2868223002/diff/20001/chrome/browser/resource... chrome/browser/resources/settings/site_settings/site_list.js:190: * @param {!SiteException} item The content setting exception. Nit: Maybe a more descriptive name would be |exception| instead of |item|? Same below. https://codereview.chromium.org/2868223002/diff/20001/chrome/browser/resource... chrome/browser/resources/settings/site_settings/site_list.js:194: isResetButtonHidden_: function(enforcement, readOnlyList, item) { Nit (optional): I think it would improve readability to rename as follows isResetButtonHidden_ -> shouldHideResetButton_ isActionMenuHidden_ -> shouldHideActionMenu_ The current naming reverses the cause-effect relationship. What I expect as a reader when I see the contents of "isResetButtonHidden_" is something like return this.$$('#resetButton').hidden; Whereas in reality we use the value returned by the function to hide/show the element. https://codereview.chromium.org/2868223002/diff/20001/chrome/test/data/webui/... File chrome/test/data/webui/settings/site_list_tests.js (right): https://codereview.chromium.org/2868223002/diff/20001/chrome/test/data/webui/... chrome/test/data/webui/settings/site_list_tests.js:130: * An example pref with with and without embeddingOrigin. s/with with/with https://codereview.chromium.org/2868223002/diff/20001/chrome/test/data/webui/... chrome/test/data/webui/settings/site_list_tests.js:1040: settings.ContentSettingsTypes.GEOLOCATION, Should we use a different category for this test, since GEOLOCATION is read-only anyway?
The CQ bit was checked by dschuyler@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by dschuyler@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by dschuyler@chromium.org to run a CQ dry run
Patchset #2 (id:40001) has been deleted
Patchset #2 (id:60001) has been deleted
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2868223002/diff/20001/chrome/browser/resource... File chrome/browser/resources/settings/site_settings/site_list.html (right): https://codereview.chromium.org/2868223002/diff/20001/chrome/browser/resource... chrome/browser/resources/settings/site_settings/site_list.html:96: item.enforcement, readOnlyList, item)]]" On 2017/05/10 21:44:57, dpapad wrote: > It seems a bit redundant that we pass |item.enforcement| as the 1st arg, and > then we pass the entire |item| as the 3rd arg. Can we do either of the > following? > > isResetButtonHidden_(item, readOnlyList) OR > isResetButtonHidden_(item.enforcement, readOnlyList, item.embeddingOrigin) Done. https://codereview.chromium.org/2868223002/diff/20001/chrome/browser/resource... File chrome/browser/resources/settings/site_settings/site_list.js (right): https://codereview.chromium.org/2868223002/diff/20001/chrome/browser/resource... chrome/browser/resources/settings/site_settings/site_list.js:190: * @param {!SiteException} item The content setting exception. On 2017/05/10 21:44:57, dpapad wrote: > Nit: Maybe a more descriptive name would be |exception| instead of |item|? Same > below. Done. https://codereview.chromium.org/2868223002/diff/20001/chrome/browser/resource... chrome/browser/resources/settings/site_settings/site_list.js:194: isResetButtonHidden_: function(enforcement, readOnlyList, item) { On 2017/05/10 21:44:57, dpapad wrote: > Nit (optional): I think it would improve readability to rename as follows > > isResetButtonHidden_ -> shouldHideResetButton_ > isActionMenuHidden_ -> shouldHideActionMenu_ > > The current naming reverses the cause-effect relationship. What I expect as a > reader when I see the contents of "isResetButtonHidden_" is something like > > return this.$$('#resetButton').hidden; > > Whereas in reality we use the value returned by the function to hide/show the > element. Done. https://codereview.chromium.org/2868223002/diff/20001/chrome/test/data/webui/... File chrome/test/data/webui/settings/site_list_tests.js (right): https://codereview.chromium.org/2868223002/diff/20001/chrome/test/data/webui/... chrome/test/data/webui/settings/site_list_tests.js:130: * An example pref with with and without embeddingOrigin. On 2017/05/10 21:44:57, dpapad wrote: > s/with with/with Done. https://codereview.chromium.org/2868223002/diff/20001/chrome/test/data/webui/... chrome/test/data/webui/settings/site_list_tests.js:1040: settings.ContentSettingsTypes.GEOLOCATION, On 2017/05/10 21:44:57, dpapad wrote: > Should we use a different category for this test, since GEOLOCATION is read-only > anyway? Done.
LGTM
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by dschuyler@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by dschuyler@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 80001, "attempt_start_ts": 1494967913358520, "parent_rev": "5228a2833da014443b36abc4e1c15e035d5d4d69", "commit_rev": "ad2fac2570c69d70b459d284aa469feab9928dbe"}
Message was sent while issue was closed.
Description was changed from ========== [MD settings] content exceptions with embeddingOrigin as read-only This CL makes content settings exceptions that have an embeddingOrigin read-only. That means they may be removed (deleted), but they cannot be edited (not even changing the category). BUG=716687 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== [MD settings] content exceptions with embeddingOrigin as read-only This CL makes content settings exceptions that have an embeddingOrigin read-only. That means they may be removed (deleted), but they cannot be edited (not even changing the category). BUG=716687 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2868223002 Cr-Commit-Position: refs/heads/master@{#472297} Committed: https://chromium.googlesource.com/chromium/src/+/ad2fac2570c69d70b459d284aa46... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:80001) as https://chromium.googlesource.com/chromium/src/+/ad2fac2570c69d70b459d284aa46... |