Index: chrome/browser/ui/browser_instant_controller.cc |
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc |
index b5a2820d930d37a29d34989febbc8fee8af23147..15ec0efa678a1b45dad23dd1d29a556d43671567 100644 |
--- a/chrome/browser/ui/browser_instant_controller.cc |
+++ b/chrome/browser/ui/browser_instant_controller.cc |
@@ -25,6 +25,12 @@ |
#include "ui/gfx/color_utils.h" |
#include "ui/gfx/sys_color_change_listener.h" |
+namespace { |
+const char* GetInstantPrefName(Profile* profile) { |
+ return chrome::search::IsInstantExtendedAPIEnabled(profile) ? |
+ prefs::kInstantExtendedEnabled : prefs::kInstantEnabled; |
+} |
+} |
namespace chrome { |
@@ -40,7 +46,7 @@ BrowserInstantController::BrowserInstantController(Browser* browser) |
theme_area_height_(0) { |
profile_pref_registrar_.Init(browser_->profile()->GetPrefs()); |
profile_pref_registrar_.Add( |
- prefs::kInstantEnabled, |
+ GetInstantPrefName(browser_->profile()), |
base::Bind(&BrowserInstantController::ResetInstant, |
base::Unretained(this))); |
ResetInstant(); |
@@ -60,12 +66,14 @@ BrowserInstantController::~BrowserInstantController() { |
bool BrowserInstantController::IsInstantEnabled(Profile* profile) { |
return profile && !profile->IsOffTheRecord() && profile->GetPrefs() && |
- profile->GetPrefs()->GetBoolean(prefs::kInstantEnabled); |
+ profile->GetPrefs()->GetBoolean(GetInstantPrefName(profile)); |
} |
void BrowserInstantController::RegisterUserPrefs(PrefService* prefs) { |
prefs->RegisterBooleanPref(prefs::kInstantConfirmDialogShown, false, |
PrefService::SYNCABLE_PREF); |
+ prefs->RegisterBooleanPref(prefs::kInstantExtendedEnabled, true, |
+ PrefService::SYNCABLE_PREF); |
prefs->RegisterBooleanPref(prefs::kInstantEnabled, false, |
PrefService::SYNCABLE_PREF); |
} |