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

Issue 1252973002: Remove the migration code from content_settings::DefaultProvider. (Closed)

Created:
5 years, 5 months ago by msramek
Modified:
5 years, 4 months ago
CC:
chromium-reviews, markusheintz_, raymes+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove the migration code from content_settings::DefaultProvider. The migration of default content settings from one dictionary pref into individual prefs appeared in M43. The next branchpoint is M46. After three versions, it is safe to remove the migration code. Question: What happens to users who weren't migrated during this time (i.e. jump from M<43 to M>=46)? Answer: Their content settings will be reset, since their individual prefs will not be populated. However, their profile won't be damaged; the old dictionary will be simply ignored. Thus, the user will have their settings restored to default values, as if in a new profile. For the more sensitive settings, the user will be asked before a permission is granted to the site; however, for cookies, images and javascript the default value is to allow websites to use them. TESTED=Change in the settings UI was correctly reflected in the same window, in incognito window, and for synced settings also on a synced computer. BUG=452388 Committed: https://crrev.com/9681220b472add22fd10d1034d667c2160c4247d Cr-Commit-Position: refs/heads/master@{#340475}

Patch Set 1 : #

Patch Set 2 : Fixed the unittest. #

Patch Set 3 : Removed the media migration code. #

Total comments: 8

Patch Set 4 : Addressed comments. #

Total comments: 2

Patch Set 5 : Added a TODO. #

Patch Set 6 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -321 lines) Patch
M chrome/browser/content_settings/content_settings_default_provider_unittest.cc View 4 chunks +3 lines, -61 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map_unittest.cc View 1 2 3 4 5 2 chunks +2 lines, -11 lines 0 comments Download
M chrome/browser/prefs/pref_functional_browsertest.cc View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M components/content_settings/core/browser/content_settings_default_provider.h View 1 2 3 2 chunks +9 lines, -29 lines 0 comments Download
M components/content_settings/core/browser/content_settings_default_provider.cc View 1 2 3 4 9 chunks +52 lines, -205 lines 0 comments Download
M components/content_settings/core/common/pref_names.h View 1 2 3 4 5 1 chunk +0 lines, -2 lines 0 comments Download
M components/content_settings/core/common/pref_names.cc View 1 2 3 4 5 1 chunk +0 lines, -9 lines 0 comments Download

Messages

Total messages: 24 (8 generated)
msramek
Hi Markus and Raymes, it's time to start removing the content settings migration code. PTAL ...
5 years, 5 months ago (2015-07-24 13:53:58 UTC) #3
msramek
+Dominic PTAL for chrome/browser/prefs Thanks, Martin
5 years, 5 months ago (2015-07-24 13:56:15 UTC) #5
msramek
Note that we also remove the COOKIES, PROTECTED_MEDIA_IDENTIFIER, and MEDIASTREAM value migration code. All three ...
5 years, 5 months ago (2015-07-24 15:53:37 UTC) #6
raymes
lgtm https://codereview.chromium.org/1252973002/diff/60001/components/content_settings/core/browser/content_settings_default_provider.cc File components/content_settings/core/browser/content_settings_default_provider.cc (left): https://codereview.chromium.org/1252973002/diff/60001/components/content_settings/core/browser/content_settings_default_provider.cc#oldcode115 components/content_settings/core/browser/content_settings_default_provider.cc:115: // content settings should be read from the ...
5 years, 5 months ago (2015-07-27 02:04:32 UTC) #7
battre
https://codereview.chromium.org/1252973002/diff/60001/components/content_settings/core/common/pref_names.cc File components/content_settings/core/common/pref_names.cc (left): https://codereview.chromium.org/1252973002/diff/60001/components/content_settings/core/common/pref_names.cc#oldcode34 components/content_settings/core/common/pref_names.cc:34: "profile.migrated_default_content_settings"; I think there is traditionally one more step: ...
5 years, 4 months ago (2015-07-27 08:32:36 UTC) #8
markusheintz_
https://codereview.chromium.org/1252973002/diff/60001/chrome/browser/prefs/pref_functional_browsertest.cc File chrome/browser/prefs/pref_functional_browsertest.cc (right): https://codereview.chromium.org/1252973002/diff/60001/chrome/browser/prefs/pref_functional_browsertest.cc#newcode90 chrome/browser/prefs/pref_functional_browsertest.cc:90: browser()->profile()->GetPrefs()->SetInteger(prefs::kDefaultImagesSetting, 2); Can you use the enum value that ...
5 years, 4 months ago (2015-07-27 08:51:32 UTC) #9
markusheintz_
Please mention in you CL description (in the "Answer to your question") that resetting the ...
5 years, 4 months ago (2015-07-27 08:54:41 UTC) #10
msramek
https://codereview.chromium.org/1252973002/diff/60001/chrome/browser/prefs/pref_functional_browsertest.cc File chrome/browser/prefs/pref_functional_browsertest.cc (right): https://codereview.chromium.org/1252973002/diff/60001/chrome/browser/prefs/pref_functional_browsertest.cc#newcode90 chrome/browser/prefs/pref_functional_browsertest.cc:90: browser()->profile()->GetPrefs()->SetInteger(prefs::kDefaultImagesSetting, 2); On 2015/07/27 08:51:32, markusheintz_ wrote: > Can ...
5 years, 4 months ago (2015-07-27 09:13:27 UTC) #11
msramek
On 2015/07/27 08:54:41, markusheintz_ wrote: > Please mention in you CL description (in the "Answer ...
5 years, 4 months ago (2015-07-27 09:14:43 UTC) #12
battre
lgtm https://codereview.chromium.org/1252973002/diff/80001/components/content_settings/core/browser/content_settings_default_provider.cc File components/content_settings/core/browser/content_settings_default_provider.cc (right): https://codereview.chromium.org/1252973002/diff/80001/components/content_settings/core/browser/content_settings_default_provider.cc#newcode31 components/content_settings/core/browser/content_settings_default_provider.cc:31: // Obsolete prefs to be removed from the ...
5 years, 4 months ago (2015-07-27 09:54:04 UTC) #13
msramek
https://codereview.chromium.org/1252973002/diff/80001/components/content_settings/core/browser/content_settings_default_provider.cc File components/content_settings/core/browser/content_settings_default_provider.cc (right): https://codereview.chromium.org/1252973002/diff/80001/components/content_settings/core/browser/content_settings_default_provider.cc#newcode31 components/content_settings/core/browser/content_settings_default_provider.cc:31: // Obsolete prefs to be removed from the pref ...
5 years, 4 months ago (2015-07-27 15:10:52 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1252973002/90001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1252973002/90001
5 years, 4 months ago (2015-07-27 15:11:17 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/77808) ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 4 months ago (2015-07-27 15:13:58 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1252973002/110001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1252973002/110001
5 years, 4 months ago (2015-07-27 15:20:36 UTC) #22
commit-bot: I haz the power
Committed patchset #6 (id:110001)
5 years, 4 months ago (2015-07-27 16:00:14 UTC) #23
commit-bot: I haz the power
5 years, 4 months ago (2015-07-27 16:00:40 UTC) #24
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/9681220b472add22fd10d1034d667c2160c4247d
Cr-Commit-Position: refs/heads/master@{#340475}

Powered by Google App Engine
This is Rietveld 408576698