New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 754178 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , All , Chrome , Mac
Pri: 3
Type: Task
Team-Security-UX



Sign in to add a comment

Remove resource identifier from content settings

Project Member Reported by bauerb@chromium.org, Aug 10 2017

Issue description

Only the PLUGINS content type ever used resource identifiers, and there is only one plugin where content settings apply (Flash), so plugin-specific content settings aren't really a thing anymore. We should

1) Migrate existing Flash-specific PLUGINS content settings to general PLUGINS contents settings
2) Remove resource_identifier from the content_settings/ API and implementation
3) Figure out what to do with resource identifiers in the content settings extension API (ignore? log a warning?)
 
Cc: msramek@chromium.org
Components: UI>Browser>SiteSettings
1) Note that we won't be able to directly migrate extensions- and policy-sourced settings. If either of the sources is already configured to set two exceptions that would be contradictory when removing identifiers, we will just need to resolve the contradiction but we don't have a good way to notify users. For extensions, we can log a warning on extension startup, but for policies, no idea.

2) raymes@ has an old open CL here: https://codereview.chromium.org/2376453003/ 

3) Agreed. I think we should start logging a warning (and treating the setting as if the identifier wasn't there), then change the API after a few milestones.

Comment 2 by est...@chromium.org, Nov 10 2017

Labels: Hotlist-EnamelAndFriendsFixIt
Owner: benwells@chromium.org
Status: Started (was: Available)
Just looking into this now. Are we sure that flash is the only plugin that has content settings now?

I'm asking because the code seems to set content settings for two internal plugins: the remoting viewer plugin path and the pdf plugin.

See https://cs.chromium.org/chromium/src/chrome/browser/content_settings/content_settings_internal_extension_provider.cc?rcl=5b77edab12b839c6375590e8151b7113652d67f5&l=172.

Raymes / Martin, some questions:
- is the code for these internal plugins still needed
- if it is, can we do it some other way and still remove resource identifiers from the API?

Comment 4 by raymes@chromium.org, Nov 15 2017

I just forwarded you an email thread but I think that code is essentially dead code now and can be deleted. 
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7bfd0bc891f489604cfe27d1a14f98450c84a420

commit 7bfd0bc891f489604cfe27d1a14f98450c84a420
Author: Ben Wells <benwells@chromium.org>
Date: Mon Nov 20 02:00:58 2017

Remove the internal extensions content settings provider.

This was only used for plugin settings, which are not needed any more.

Bug: 754178
Change-Id: I24a9d1d08fd5a00fca088ed7ac212148af6c30e0
Reviewed-on: https://chromium-review.googlesource.com/773898
Commit-Queue: Ben Wells <benwells@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517742}
[modify] https://crrev.com/7bfd0bc891f489604cfe27d1a14f98450c84a420/chrome/browser/BUILD.gn
[delete] https://crrev.com/27d7d5f523cbee15622c69ff8bc37ef6eeffd52e/chrome/browser/content_settings/content_settings_internal_extension_provider.cc
[delete] https://crrev.com/27d7d5f523cbee15622c69ff8bc37ef6eeffd52e/chrome/browser/content_settings/content_settings_internal_extension_provider.h
[modify] https://crrev.com/7bfd0bc891f489604cfe27d1a14f98450c84a420/chrome/browser/extensions/extension_service.cc
[modify] https://crrev.com/7bfd0bc891f489604cfe27d1a14f98450c84a420/chrome/browser/pdf/pdf_extension_util.cc
[modify] https://crrev.com/7bfd0bc891f489604cfe27d1a14f98450c84a420/chrome/browser/pdf/pdf_extension_util.h
[modify] https://crrev.com/7bfd0bc891f489604cfe27d1a14f98450c84a420/chrome/common/chrome_content_client.h
[modify] https://crrev.com/7bfd0bc891f489604cfe27d1a14f98450c84a420/chrome/common/chrome_content_client_constants.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Dec 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/37241c17b6ef588bf99fce794ead96b8d0c2c69a

commit 37241c17b6ef588bf99fce794ead96b8d0c2c69a
Author: Ben Wells <benwells@chromium.org>
Date: Mon Dec 04 01:05:11 2017

Add DCHECKS to ensure content settings API isn't used with resource ids

Using resource ids with the content settings API is supported but is
apparently not being used. This change adds some DCHECKS to check that
this is true as preparation for removing resource ids from the API.

Bug: 754178
Change-Id: I6ac49bf697fc342332905c7e814ef4e61f32695f
Reviewed-on: https://chromium-review.googlesource.com/790075
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Ben Wells <benwells@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521243}
[modify] https://crrev.com/37241c17b6ef588bf99fce794ead96b8d0c2c69a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
[modify] https://crrev.com/37241c17b6ef588bf99fce794ead96b8d0c2c69a/chrome/browser/plugins/plugin_info_host_impl_unittest.cc
[modify] https://crrev.com/37241c17b6ef588bf99fce794ead96b8d0c2c69a/components/content_settings/core/browser/content_settings_pref.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Dec 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c9fc420fb0e0c7346abe0cb57ebfd528fe6f8d6b

commit c9fc420fb0e0c7346abe0cb57ebfd528fe6f8d6b
Author: mark a. foltz <mfoltz@chromium.org>
Date: Fri Dec 08 20:57:41 2017

Revert "Add DCHECKS to ensure content settings API isn't used with resource ids"

This reverts commit 37241c17b6ef588bf99fce794ead96b8d0c2c69a.

Reason for revert: Crashes Albatross builds.  crbug.com/793265

Original change's description:
> Add DCHECKS to ensure content settings API isn't used with resource ids
> 
> Using resource ids with the content settings API is supported but is
> apparently not being used. This change adds some DCHECKS to check that
> this is true as preparation for removing resource ids from the API.
> 
> Bug: 754178
> Change-Id: I6ac49bf697fc342332905c7e814ef4e61f32695f
> Reviewed-on: https://chromium-review.googlesource.com/790075
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Raymes Khoury <raymes@chromium.org>
> Commit-Queue: Ben Wells <benwells@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#521243}

TBR=raymes@chromium.org,thestig@chromium.org,benwells@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 754178, 793265
Change-Id: I6c0b186cf69572987a8e29a0922336f4e6b5b21b
Reviewed-on: https://chromium-review.googlesource.com/817993
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Commit-Queue: mark a. foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522870}
[modify] https://crrev.com/c9fc420fb0e0c7346abe0cb57ebfd528fe6f8d6b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
[modify] https://crrev.com/c9fc420fb0e0c7346abe0cb57ebfd528fe6f8d6b/chrome/browser/plugins/plugin_info_host_impl_unittest.cc
[modify] https://crrev.com/c9fc420fb0e0c7346abe0cb57ebfd528fe6f8d6b/components/content_settings/core/browser/content_settings_pref.cc

Cc: benwells@chromium.org
Owner: ----
Status: Available (was: Started)
Unfortunately I don't have cycles to look at this.
Labels: Hotlist-Privacy OS-Chrome OS-Linux OS-Mac OS-Windows
Labels: -Hotlist-EnamelAndFriendsFixIt

Sign in to add a comment