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

Issue 5494001: Skip migrating for default shown sections prefs. (Closed)

Created:
10 years ago by xiyuan
Modified:
9 years, 7 months ago
Reviewers:
Aaron Boodman
CC:
chromium-reviews, ben+cc_chromium.org, zel
Visibility:
Public.

Description

Skip migrating for default shown sections prefs. BUG=chromium-os:9737 TEST=Verify fix for chromium-os:9737 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=67907

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -0 lines) Patch
M chrome/browser/dom_ui/shown_sections_handler.cc View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
xiyuan
MigrateUserPrefs is also called for a brand new user profile and clears out the minimized ...
10 years ago (2010-12-01 19:52:33 UTC) #1
Aaron Boodman
I think this will result in the current version never getting set until the user ...
10 years ago (2010-12-01 21:57:48 UTC) #2
xiyuan
On 2010/12/01 21:57:48, Aaron Boodman wrote: > I think this will result in the current ...
10 years ago (2010-12-01 22:10:34 UTC) #3
Aaron Boodman
On 2010/12/01 22:10:34, xiyuan wrote: > On 2010/12/01 21:57:48, Aaron Boodman wrote: > > I ...
10 years ago (2010-12-01 23:01:12 UTC) #4
xiyuan
10 years ago (2010-12-01 23:11:48 UTC) #5
On 2010/12/01 23:01:12, Aaron Boodman wrote:
> On 2010/12/01 22:10:34, xiyuan wrote:
> > On 2010/12/01 21:57:48, Aaron Boodman wrote:
> > > I think this will result in the current version never getting set until
the
> > user
> > > changes the expanded sections. It might be better to move your defaulting
> > logic
> > > for Chrome OS here, so it is all in one place.
> > 
> > If user never changes anything on the NTP, should we show them the default
> > layout always?
> > 
> > The old code will set an explicit shown sections value. Thus user would
stick
> to
> > this layout regardless of the default values again. Is this the desired
> > behavior?
> 
> Nevermind, I misread the code.
> 
> I'm a little worried that this will have unintended consequences in the future
> if we add more migration code for future versions, and the current value at
that
> point just happens to match the default value.
> 
> But I don't have a better suggestion, so LGTM

PrefService::Preference::IsDefaultValue does not depend on the prefs value. It
checks if the value is from default prefs value store or not. I hope this would
make you feel better. :)

As long as we keep the default value of kNTPShownSections consistent with the
migration logic (i.e. no invalid default kNTPShownSections values), we should be
fine.

Powered by Google App Engine
This is Rietveld 408576698