Index: chrome/browser/ui/webui/options/browser_options_handler.cc |
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc |
index 2775f3c8c1b7a988ef5b05e00d715ece1f575498..5d3ec8b4a6065a04d5d09200b0af461a91eab22b 100644 |
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc |
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc |
@@ -48,6 +48,7 @@ |
#include "chrome/browser/themes/theme_service.h" |
#include "chrome/browser/themes/theme_service_factory.h" |
#include "chrome/browser/ui/browser_finder.h" |
+#include "chrome/browser/ui/browser_instant_controller.h" |
#include "chrome/browser/ui/chrome_select_file_policy.h" |
#include "chrome/browser/ui/host_desktop.h" |
#include "chrome/browser/ui/options/options_util.h" |
@@ -416,6 +417,17 @@ void BrowserOptionsHandler::GetLocalizedValues(DictionaryValue* values) { |
} else { |
values->SetString("instant_enabled", "instant.enabled"); |
} |
+ // This is needed because in the instant extended case, |
+ // search::GetInstantExtendedDefaultSetting may say |
+ // INSTANT_USE_EXISTING, which means use the current value of |
+ // kInstantEnabled. See browser_options.js for where we set the |
+ // checkbox to this value. |
+ // |
+ // We do this both in the instant extended case and in the regular |
+ // case so that there is less difference between code paths. |
+ values->SetBoolean("instant_starting_value", |
+ chrome::BrowserInstantController::IsInstantEnabled( |
+ Profile::FromWebUI(web_ui()))); |
Mattias Nissler (ping if slow)
2013/02/25 18:53:41
I think this is not needed, but you just have to f
|
values->SetString( |
"instantPrefAndWarning", |
l10n_util::GetStringFUTF16(instant_message_id, instant_learn_more_url)); |