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

Issue 7396025: Refactor Instant web UI (chrome://settings page). (Closed)

Created:
9 years, 5 months ago by sreeram
Modified:
9 years, 5 months ago
CC:
chromium-reviews, arv (Not doing code reviews)
Visibility:
Public.

Description

Refactor 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -11 lines) Patch
M chrome/browser/instant/instant_controller.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/resources/options/browser_options.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/options/browser_options.js View 1 2 3 4 5 1 chunk +9 lines, -6 lines 0 comments Download
M chrome/browser/resources/options/instant_confirm_overlay.js View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/resources/options/pref_ui.js View 1 2 3 4 5 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.cc View 3 chunks +15 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
sreeram
Please review.
9 years, 5 months ago (2011-07-18 17:43:05 UTC) #1
sky
You should get estade to review the webui changes. The instant change LGTM
9 years, 5 months ago (2011-07-18 21:10:56 UTC) #2
sky
This time with Evan as a reviewer. -Scott
9 years, 5 months ago (2011-07-18 21:11:19 UTC) #3
Evan Stade
would it not work to just leave it as is, but override the click handling?
9 years, 5 months ago (2011-07-19 00:15:32 UTC) #4
sreeram
On Mon, Jul 18, 2011 at 17:15, <estade@chromium.org> wrote: > would it not work to ...
9 years, 5 months ago (2011-07-19 00:47:05 UTC) #5
Evan Stade
I think you could fix that by preventing propagation of the 'change' event if the ...
9 years, 5 months ago (2011-07-19 00:59:48 UTC) #6
sreeram
On Mon, Jul 18, 2011 at 17:59, <estade@chromium.org> wrote: > I think you could fix ...
9 years, 5 months ago (2011-07-19 03:59:37 UTC) #7
Evan Stade
On 2011/07/19 03:59:37, sreeram wrote: > On Mon, Jul 18, 2011 at 17:59, <mailto:estade@chromium.org> wrote: ...
9 years, 5 months ago (2011-07-19 23:42:08 UTC) #8
sreeram
On Tue, Jul 19, 2011 at 16:42, <estade@chromium.org> wrote: > So instead of allowing the ...
9 years, 5 months ago (2011-07-20 16:35:18 UTC) #9
sreeram
estade: ping? I'd like to get this in soon, so that it makes the M14 ...
9 years, 5 months ago (2011-07-21 16:35:29 UTC) #10
Evan Stade
On 2011/07/20 16:35:18, sreeram wrote: > On Tue, Jul 19, 2011 at 16:42, <mailto:estade@chromium.org> wrote: ...
9 years, 5 months ago (2011-07-21 22:38:57 UTC) #11
sky
On Thu, Jul 21, 2011 at 9:35 AM, <sreeram@chromium.org> wrote: > estade: ping? > > ...
9 years, 5 months ago (2011-07-21 22:49:48 UTC) #12
sreeram
On Thu, Jul 21, 2011 at 15:49, Scott Violet <sky@chromium.org> wrote: > It's my understanding ...
9 years, 5 months ago (2011-07-22 13:32:09 UTC) #13
sreeram
On Thu, Jul 21, 2011 at 15:38, <estade@chromium.org> wrote: > On 2011/07/20 16:35:18, sreeram wrote: ...
9 years, 5 months ago (2011-07-22 13:45:16 UTC) #14
Evan Stade
yes, it does seem we are having trouble communicating. Your patch does break pref management. ...
9 years, 5 months ago (2011-07-22 19:28:30 UTC) #15
sreeram
On Fri, Jul 22, 2011 at 12:28, <estade@chromium.org> wrote: > yes, it does seem we ...
9 years, 5 months ago (2011-07-22 19:42:09 UTC) #16
Evan Stade
On 2011/07/22 19:42:09, sreeram wrote: > On Fri, Jul 22, 2011 at 12:28, <mailto:estade@chromium.org> wrote: ...
9 years, 5 months ago (2011-07-22 20:35:14 UTC) #17
sreeram
@estade: I've updated the patch to keep the pref tied to the checkbox, but to ...
9 years, 5 months ago (2011-07-25 12:16:50 UTC) #18
Evan Stade
just nits http://codereview.chromium.org/7396025/diff/19002/chrome/browser/resources/options/browser_options.js File chrome/browser/resources/options/browser_options.js (right): http://codereview.chromium.org/7396025/diff/19002/chrome/browser/resources/options/browser_options.js#newcode76 chrome/browser/resources/options/browser_options.js:76: if (self.instantConfirmDialogShown_) { nit: no curlies http://codereview.chromium.org/7396025/diff/19002/chrome/browser/resources/options/pref_ui.js ...
9 years, 5 months ago (2011-07-25 23:01:33 UTC) #19
sreeram
http://codereview.chromium.org/7396025/diff/19002/chrome/browser/resources/options/browser_options.js File chrome/browser/resources/options/browser_options.js (right): http://codereview.chromium.org/7396025/diff/19002/chrome/browser/resources/options/browser_options.js#newcode76 chrome/browser/resources/options/browser_options.js:76: if (self.instantConfirmDialogShown_) { On 2011/07/25 23:01:34, Evan Stade wrote: ...
9 years, 5 months ago (2011-07-25 23:56:42 UTC) #20
Evan Stade
SetInstantEnabled was the name I was thinking of. but anyway, LGTM
9 years, 5 months ago (2011-07-26 00:04:28 UTC) #21
commit-bot: I haz the power
9 years, 5 months ago (2011-07-26 01:07:02 UTC) #22
Change committed as 94005

Powered by Google App Engine
This is Rietveld 408576698