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

Issue 1865803002: [Policy Experimental] Add policies to allow Cookies and Pop-ups exceptions. (Closed)

Created:
4 years, 8 months ago by huangs
Modified:
3 years, 10 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, msramek+watch_chromium.org, michaelpg+watch-options_chromium.org, raymes+watch_chromium.org, arv+watch_chromium.org, asvitkine+watch_chromium.org, markusheintz_, tnagel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Policy Experimental] Add policies to allow Cookies and Pop-ups exceptions. Previously users can always set preference exceptions in chrome://settings to allow or block contents. If policy default settings are set, then user exceptions become ineffective, but remain editable. This CL aims to: - Make user exceptions take precedence over policy default settings, if allowed by policy. - Fix related UI issues in chrome://settings We added new policies (for cookies and pop-ups) to allow admin to control whether the user preference exceptions: - Are active iff policy default settings are set (current behavior). - Can take precidence over policy default settings. BUG=601057

Patch Set 1 #

Total comments: 1

Patch Set 2 : Sync. #

Patch Set 3 : Remove spurious refatoring and unused code to streamline CL. #

Patch Set 4 : Fix JS comments; cleanup. #

Patch Set 5 : Fix JS refactoring bug; rename settings; add 2 unittests; fix presubmit. #

Total comments: 14

Patch Set 6 : Add another test to exercise main logic; renames from review. #

Total comments: 44

Patch Set 7 : Fix compiling issuese; another round of renaming; code cleanup. #

Total comments: 9

Patch Set 8 : Remove 'disable' feature; cleanups. #

Patch Set 9 : Sync; compile fix in PolicyProvider::GetUserExceptionsUsageSettingForType(). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+643 lines, -66 lines) Patch
M chrome/browser/content_settings/content_settings_policy_provider_unittest.cc View 1 2 3 4 5 6 7 1 chunk +51 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +145 lines, -0 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler_list_factory.cc View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/resources/options/content_settings.js View 1 2 3 4 5 6 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 3 chunks +40 lines, -2 lines 0 comments Download
M chrome/browser/ui/content_settings/content_setting_bubble_model.cc View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/ui/webui/options/content_settings_handler.cc View 1 2 3 4 5 6 7 8 5 chunks +21 lines, -3 lines 0 comments Download
M chrome/test/data/policy/policy_test_cases.json View 1 2 3 4 5 6 7 8 2 chunks +17 lines, -1 line 0 comments Download
M components/content_settings/core/browser/content_settings_policy_provider.h View 1 2 3 4 5 6 7 3 chunks +18 lines, -0 lines 0 comments Download
M components/content_settings/core/browser/content_settings_policy_provider.cc View 1 2 3 4 5 6 7 8 9 chunks +70 lines, -3 lines 0 comments Download
M components/content_settings/core/browser/host_content_settings_map.h View 1 2 3 4 5 6 7 8 6 chunks +31 lines, -7 lines 0 comments Download
M components/content_settings/core/browser/host_content_settings_map.cc View 1 2 3 4 5 6 7 8 8 chunks +101 lines, -40 lines 0 comments Download
M components/content_settings/core/common/content_settings.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M components/content_settings/core/common/pref_names.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M components/content_settings/core/common/pref_names.cc View 1 2 3 4 5 6 2 chunks +9 lines, -2 lines 0 comments Download
M components/content_settings/core/test/content_settings_test_utils.h View 1 2 3 4 5 2 chunks +10 lines, -0 lines 0 comments Download
M components/content_settings/core/test/content_settings_test_utils.cc View 1 2 3 4 5 6 2 chunks +15 lines, -0 lines 0 comments Download
M components/policy/resources/policy_templates.json View 1 2 3 4 5 6 7 8 2 chunks +61 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 2 chunks +20 lines, -0 lines 0 comments Download

Messages

Total messages: 39 (10 generated)
huangs
Experimental CL without test yet. May split and/or write design doc if requested, PTAL. Thanks! ...
4 years, 8 months ago (2016-04-06 03:21:41 UTC) #2
huangs
Also, histograms.xml and policy_test_cases.json are TODO.
4 years, 8 months ago (2016-04-06 03:47:28 UTC) #3
huangs
+bartfab@ for OWNER review of \component\policy files, PTAL.
4 years, 8 months ago (2016-04-06 17:47:59 UTC) #6
huangs
Sliced JS piece to https://codereview.chromium.org/1855393006/ .
4 years, 8 months ago (2016-04-06 19:07:54 UTC) #7
raymes
Some drive-by comments :) You may want to wait for Bernhard's thoughts in case he ...
4 years, 8 months ago (2016-04-07 03:37:54 UTC) #9
huangs
+estade@ for JS file reviews. Updated and added big unittest, PTAL. Thanks! https://codereview.chromium.org/1865803002/diff/80001/components/content_settings/core/browser/content_settings_policy_provider.h File components/content_settings/core/browser/content_settings_policy_provider.h ...
4 years, 8 months ago (2016-04-07 04:36:21 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1865803002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1865803002/100001
4 years, 8 months ago (2016-04-07 04:41:14 UTC) #13
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/155790) ios_rel_device_ninja on ...
4 years, 8 months ago (2016-04-07 04:45:52 UTC) #15
Bernhard Bauer
On 2016/04/06 03:21:41, huangs wrote: > Experimental CL without test yet. May split and/or write ...
4 years, 8 months ago (2016-04-07 09:11:09 UTC) #16
msramek
> I know I'm cc'd on the discussion thread, but I have to admit I ...
4 years, 8 months ago (2016-04-07 09:27:27 UTC) #17
huangs
As mentioned in the thread, I think this is the best eventual solution. However, this ...
4 years, 8 months ago (2016-04-07 13:52:50 UTC) #18
bartfab (slow)
Policy looks reasonable overall, but this will need some end-to-end tests. https://codereview.chromium.org/1865803002/diff/100001/components/policy/resources/policy_templates.json File components/policy/resources/policy_templates.json (right): ...
4 years, 8 months ago (2016-04-07 14:39:29 UTC) #19
Bernhard Bauer
On 2016/04/07 13:52:50, huangs wrote: > As mentioned in the thread, I think this is ...
4 years, 8 months ago (2016-04-07 15:30:13 UTC) #20
bartfab (slow)
PM has since chimed in and clarified that this can (and should :) wait for ...
4 years, 8 months ago (2016-04-07 15:32:08 UTC) #21
huangs
On 2016/04/07 15:30:13, Bernhard Bauer wrote: > On 2016/04/07 13:52:50, huangs wrote: > > As ...
4 years, 8 months ago (2016-04-07 15:40:59 UTC) #22
huangs
Great to hear re. M52! So here's the tentative plan now: - Get this CL ...
4 years, 8 months ago (2016-04-07 16:27:07 UTC) #23
Evan Stade
On 2016/04/07 16:27:07, huangs wrote: > Great to hear re. M52! So here's the tentative ...
4 years, 8 months ago (2016-04-07 16:42:29 UTC) #24
huangs
> so you'll ping me when it's ready for me to look at? Yup! Should ...
4 years, 8 months ago (2016-04-07 17:33:36 UTC) #25
Evan Stade
On 2016/04/07 17:33:36, huangs wrote: > > so you'll ping me when it's ready for ...
4 years, 8 months ago (2016-04-07 18:08:21 UTC) #26
huangs
Sounds good, I'll chime him in on that next week.
4 years, 8 months ago (2016-04-07 21:41:14 UTC) #27
huangs
Updated! I'll have the design doc next week. Reviews of this CL would still be ...
4 years, 8 months ago (2016-04-07 21:44:07 UTC) #28
bartfab (slow)
https://codereview.chromium.org/1865803002/diff/100001/components/policy/resources/policy_templates.json File components/policy/resources/policy_templates.json (right): https://codereview.chromium.org/1865803002/diff/100001/components/policy/resources/policy_templates.json#newcode3147 components/policy/resources/policy_templates.json:3147: 'name': 'PrefExceptionsUsageCookies', On 2016/04/07 21:44:07, huangs wrote: > "Pref" ...
4 years, 8 months ago (2016-04-08 10:17:30 UTC) #29
huangs
Replying to comments first. https://codereview.chromium.org/1865803002/diff/100001/components/policy/resources/policy_templates.json File components/policy/resources/policy_templates.json (right): https://codereview.chromium.org/1865803002/diff/100001/components/policy/resources/policy_templates.json#newcode3147 components/policy/resources/policy_templates.json:3147: 'name': 'PrefExceptionsUsageCookies', I like "Permit"; ...
4 years, 8 months ago (2016-04-08 13:39:13 UTC) #30
Bernhard Bauer
https://codereview.chromium.org/1865803002/diff/100001/chrome/browser/ui/webui/options/content_settings_handler.cc File chrome/browser/ui/webui/options/content_settings_handler.cc (right): https://codereview.chromium.org/1865803002/diff/100001/chrome/browser/ui/webui/options/content_settings_handler.cc#newcode880 chrome/browser/ui/webui/options/content_settings_handler.cc:880: // The special cases covered agive to get |provider_id| ...
4 years, 8 months ago (2016-04-08 14:44:35 UTC) #31
bartfab (slow)
https://codereview.chromium.org/1865803002/diff/100001/components/policy/resources/policy_templates.json File components/policy/resources/policy_templates.json (right): https://codereview.chromium.org/1865803002/diff/100001/components/policy/resources/policy_templates.json#newcode3179 components/policy/resources/policy_templates.json:3179: If this policy is left not set, user's ability ...
4 years, 8 months ago (2016-04-11 10:27:31 UTC) #32
huangs
Updated. https://codereview.chromium.org/1865803002/diff/100001/chrome/browser/ui/webui/options/content_settings_handler.cc File chrome/browser/ui/webui/options/content_settings_handler.cc (right): https://codereview.chromium.org/1865803002/diff/100001/chrome/browser/ui/webui/options/content_settings_handler.cc#newcode880 chrome/browser/ui/webui/options/content_settings_handler.cc:880: // The special cases covered agive to get ...
4 years, 8 months ago (2016-04-11 19:01:03 UTC) #33
huangs
Split off some content to https://codereview.chromium.org/1873343002/ .
4 years, 8 months ago (2016-04-11 21:38:04 UTC) #34
bartfab (slow)
https://codereview.chromium.org/1865803002/diff/120001/components/policy/resources/policy_templates.json File components/policy/resources/policy_templates.json (right): https://codereview.chromium.org/1865803002/diff/120001/components/policy/resources/policy_templates.json#newcode3147 components/policy/resources/policy_templates.json:3147: 'name': 'UserCookiesExceptionsUsage', On 2016/04/11 19:01:03, huangs wrote: > How ...
4 years, 8 months ago (2016-04-12 12:55:16 UTC) #36
huangs
4 years, 8 months ago (2016-04-25 19:38:58 UTC) #38
The UI piece is spun into http://crrev.com/1855393006/, which prevents users
from seeing and adding exceptions if policy defaults are active.  Note that the
"Manage Exceptions..." button is not disabled (a 1-line change, if we settle on
doing that).

General status: We're waiting on client/PM to see if specs can be relaxed, so
that we can avoid doing major changes.  Immediate smaller changes are:
- Spin out content_setting_bubble_model.cc change.
- Update chrome://md-settings

Powered by Google App Engine
This is Rietveld 408576698