summaryrefslogtreecommitdiffstats
path: root/chrome/browser/instant
diff options
context:
space:
mode:
authorsreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-26 01:06:57 +0000
committersreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-26 01:06:57 +0000
commit849c9631a51adf7ce6b591b6e57b5b45fee472c2 (patch)
tree61a678cd889eb15f8e314e1d7ae1b4bfaee532e7 /chrome/browser/instant
parent2c971877da9e062137a6c736165cf4ef98c962a6 (diff)
downloadchromium_src-849c9631a51adf7ce6b591b6e57b5b45fee472c2.zip
chromium_src-849c9631a51adf7ce6b591b6e57b5b45fee472c2.tar.gz
chromium_src-849c9631a51adf7ce6b591b6e57b5b45fee472c2.tar.bz2
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. Review URL: http://codereview.chromium.org/7396025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94005 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/instant')
-rw-r--r--chrome/browser/instant/instant_controller.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index c25f62c..4e99b3d 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -135,6 +135,7 @@ void InstantController::Disable(Profile* profile) {
delta.InMinutes(), 1, 60 * 24 * 10, 50);
}
+ service->SetBoolean(prefs::kInstantEnabledOnce, true);
service->SetBoolean(prefs::kInstantEnabled, false);
}