Currently content settings are either origin scoped or domain scoped. Origin scoping all settings to make the behavior of content settings more consistent across different settings.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bcbfffbbf5ed955c59e825ebfe92fbff24316aeb commit bcbfffbbf5ed955c59e825ebfe92fbff24316aeb Author: lshang <lshang@chromium.org> Date: Thu Apr 21 07:31:06 2016 Add metrics for user manually added exceptions This metric is for collecting numbers of exceptions for all content setting types. BUG= 604612 Review URL: https://codereview.chromium.org/1849673002 Cr-Commit-Position: refs/heads/master@{#388711} [modify] https://crrev.com/bcbfffbbf5ed955c59e825ebfe92fbff24316aeb/components/content_settings/core/browser/host_content_settings_map.cc [modify] https://crrev.com/bcbfffbbf5ed955c59e825ebfe92fbff24316aeb/components/content_settings/core/browser/host_content_settings_map.h [modify] https://crrev.com/bcbfffbbf5ed955c59e825ebfe92fbff24316aeb/tools/metrics/histograms/histograms.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7951c946d4b98ce8dd12718c66809fbf42ab6d54 commit 7951c946d4b98ce8dd12718c66809fbf42ab6d54 Author: lshang <lshang@chromium.org> Date: Tue Jun 28 02:35:52 2016 Set custom-scoped patterns in HostContentSettingsMapTest to keep test coverage In https://codereview.chromium.org/1686343002 we removed patterns from some tests in HostContentSettingsMapTest because we recommend developers to use SetContentSettingDefaultScope to get appropriate domain-scoped/origin-scoped patterns for different types. But now since we are migrating all content settings types to be origin scoped, we should set custom-scoped patterns in these tests so that they still could test patterns and keep test coverage. BUG= 604612 Review-Url: https://codereview.chromium.org/2078903002 Cr-Commit-Position: refs/heads/master@{#402383} [modify] https://crrev.com/7951c946d4b98ce8dd12718c66809fbf42ab6d54/chrome/browser/content_settings/host_content_settings_map_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9c9a2b8dde4e141db7fb814f9ff338927741e7c1 commit 9c9a2b8dde4e141db7fb814f9ff338927741e7c1 Author: lshang <lshang@chromium.org> Date: Fri Jul 08 09:47:40 2016 Add migration code to change existing domain scoped content settings to be origin scoped Migrate existing content settings of cookies, images, javascript, plugins, popups, mouselock and automatic-downloads to be origin scoped so that their settings only affect origins. This is the first step of migrating domain scoped settings to be origin scoped. In the following CLs we will: - Add callbacks in sync layer so that the migrated old settings are cleared after the sync process. - Change the scoping type of these content types so that new generated settings are all origin scoped and hook up all the migration code and sync callbacks. BUG= 604612 Review-Url: https://codereview.chromium.org/1895993003 Cr-Commit-Position: refs/heads/master@{#404340} [modify] https://crrev.com/9c9a2b8dde4e141db7fb814f9ff338927741e7c1/chrome/browser/content_settings/host_content_settings_map_unittest.cc [modify] https://crrev.com/9c9a2b8dde4e141db7fb814f9ff338927741e7c1/components/content_settings/core/browser/host_content_settings_map.cc [modify] https://crrev.com/9c9a2b8dde4e141db7fb814f9ff338927741e7c1/components/content_settings/core/browser/host_content_settings_map.h [modify] https://crrev.com/9c9a2b8dde4e141db7fb814f9ff338927741e7c1/components/content_settings/core/common/content_settings_pattern.cc [modify] https://crrev.com/9c9a2b8dde4e141db7fb814f9ff338927741e7c1/components/content_settings/core/common/content_settings_pattern.h [modify] https://crrev.com/9c9a2b8dde4e141db7fb814f9ff338927741e7c1/components/content_settings/core/common/content_settings_pattern_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2cf5c57f54ec0aa57d422f6f4f89dddd9c641051 commit 2cf5c57f54ec0aa57d422f6f4f89dddd9c641051 Author: lshang <lshang@chromium.org> Date: Fri Jul 15 01:36:32 2016 Add callback list to PrefModelAssociator after sync data is loaded This is a follow up CL of https://codereview.chromium.org/1895993003. The migrated settings will be synced back because sync process happens after the construction of HostContentSettingsMap. In this CL, a callback list is added to PrefModelAssociator, which will gets registered with the migration code after construction of HostContentSettingsMap, and gets executed at the end of PrefModelAssociator::MergeDataAndStartSyncing. The follow up CL of this is https://codereview.chromium.org/2075103002. BUG= 604612 Review-Url: https://codereview.chromium.org/2078893002 Cr-Commit-Position: refs/heads/master@{#405669} [modify] https://crrev.com/2cf5c57f54ec0aa57d422f6f4f89dddd9c641051/components/syncable_prefs/pref_model_associator.cc [modify] https://crrev.com/2cf5c57f54ec0aa57d422f6f4f89dddd9c641051/components/syncable_prefs/pref_model_associator.h [modify] https://crrev.com/2cf5c57f54ec0aa57d422f6f4f89dddd9c641051/components/syncable_prefs/pref_service_syncable.cc [modify] https://crrev.com/2cf5c57f54ec0aa57d422f6f4f89dddd9c641051/components/syncable_prefs/pref_service_syncable.h [modify] https://crrev.com/2cf5c57f54ec0aa57d422f6f4f89dddd9c641051/components/syncable_prefs/pref_service_syncable_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e8d505658c6c05c87bc2f9adfb0a8f27b8ba94f8 commit e8d505658c6c05c87bc2f9adfb0a8f27b8ba94f8 Author: lshang <lshang@chromium.org> Date: Wed Jul 27 07:02:18 2016 Register a pref to control migration status Domain scoped content settings are migrated to be origin scoped, but the migration process is expected to run only once. In this CL, a pref is registered to control this, which has three states: 1. not migrated, which means the migration process has not been started yet. 2. migrated in HostContentSettingsMap(HCSM), which will not do migration again in HCSM, but can do in PrefModelAssociator. 3. migrated in PrefModelAssociator, which means the migration is all finished and won't get called again. BUG= 604612 Review-Url: https://codereview.chromium.org/2158743002 Cr-Commit-Position: refs/heads/master@{#408064} [modify] https://crrev.com/e8d505658c6c05c87bc2f9adfb0a8f27b8ba94f8/chrome/browser/content_settings/host_content_settings_map_unittest.cc [modify] https://crrev.com/e8d505658c6c05c87bc2f9adfb0a8f27b8ba94f8/components/content_settings/core/browser/host_content_settings_map.cc [modify] https://crrev.com/e8d505658c6c05c87bc2f9adfb0a8f27b8ba94f8/components/content_settings/core/browser/host_content_settings_map.h [modify] https://crrev.com/e8d505658c6c05c87bc2f9adfb0a8f27b8ba94f8/components/content_settings/core/common/pref_names.cc [modify] https://crrev.com/e8d505658c6c05c87bc2f9adfb0a8f27b8ba94f8/components/content_settings/core/common/pref_names.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ca0ff0335dfc0552e5ba76c820a92f506c4baf23 commit ca0ff0335dfc0552e5ba76c820a92f506c4baf23 Author: lshang <lshang@chromium.org> Date: Wed Jul 27 07:10:38 2016 Change ContentSettingsType's scoping type and hookup migration code This is a follow up CL of https://codereview.chromium.org/1895993003/ and https://codereview.chromium.org/2078893002/. In this CL, the scoping type of content setting types are changed to origin scoped so that new settings generated for these types affect origins only. Also migration code is brought to take effect to deal with old domain scoped settings. BUG= 604612 Review-Url: https://codereview.chromium.org/2075103002 Cr-Commit-Position: refs/heads/master@{#408067} [modify] https://crrev.com/ca0ff0335dfc0552e5ba76c820a92f506c4baf23/chrome/browser/browsing_data/cookies_tree_model_unittest.cc [modify] https://crrev.com/ca0ff0335dfc0552e5ba76c820a92f506c4baf23/chrome/browser/content_settings/host_content_settings_map_factory.cc [modify] https://crrev.com/ca0ff0335dfc0552e5ba76c820a92f506c4baf23/chrome/browser/content_settings/host_content_settings_map_unittest.cc [modify] https://crrev.com/ca0ff0335dfc0552e5ba76c820a92f506c4baf23/components/content_settings/core/browser/content_settings_registry.cc [modify] https://crrev.com/ca0ff0335dfc0552e5ba76c820a92f506c4baf23/components/content_settings/core/browser/host_content_settings_map.cc [modify] https://crrev.com/ca0ff0335dfc0552e5ba76c820a92f506c4baf23/components/content_settings/core/browser/host_content_settings_map.h [modify] https://crrev.com/ca0ff0335dfc0552e5ba76c820a92f506c4baf23/components/content_settings/core/browser/website_settings_info.h [modify] https://crrev.com/ca0ff0335dfc0552e5ba76c820a92f506c4baf23/components/content_settings/core/browser/website_settings_registry.cc [modify] https://crrev.com/ca0ff0335dfc0552e5ba76c820a92f506c4baf23/components/content_settings/core/browser/website_settings_registry_unittest.cc
Comment 1 by bugdroid1@chromium.org
, Apr 21 2016