DescriptionRefactor Instant web UI (chrome://settings page).
Currently, the web UI directly sets two Instant prefs (instant.enabled and
instant.confirm_dialog_shown), but doesn't call InstantController's Enable()
or Disable(). Those methods set some additional prefs, so this refactoring
calls those instead. This will also be helpful in a later CL where we enable
Instant by default in a field trial.
There are two behavioural changes:
+ The kInstantEnabledOnce pref is set, even for a disable (@sky approves).
+ The first time the user enables Instant, the old behaviour used to be that
the checkbox would get cleared, then the confirm dialog would be shown. I
found that this was slightly janky, so we now leave the checkbox enabled
when showing the confirm dialog. After the user clicks OK or Cancel, the
checkbox acquires the expected state (as before).
BUG=none
TEST=Enabled/disabled checkbox, and saw no regression in behaviour.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=94005
Patch Set 1 #Patch Set 2 : Fewer changes #Patch Set 3 : Fix for managed prefs banner #Patch Set 4 : Fix for managed prefs banner (take 2) #Patch Set 5 : New approach (keep checkbox tied to pref) #
Total comments: 6
Patch Set 6 : Addressed estade's comments #
Messages
Total messages: 22 (0 generated)
|