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

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 11475028: Add new instant extended specific pref. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed last OWNERS comments. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 671c979e12a076a22c6db9badd9675966a87e40f..a5f28805579036758fc8295a8c997577d716af2a 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -49,6 +49,7 @@
#include "chrome/browser/ui/chrome_select_file_policy.h"
#include "chrome/browser/ui/host_desktop.h"
#include "chrome/browser/ui/options/options_util.h"
+#include "chrome/browser/ui/search/search.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/favicon_source.h"
#include "chrome/browser/ui/webui/web_ui_util.h"
@@ -393,10 +394,17 @@ void BrowserOptionsHandler::GetLocalizedValues(DictionaryValue* values) {
l10n_util::GetStringFUTF16(IDS_SEARCH_PREF_EXPLANATION, omnibox_url));
string16 instant_learn_more_url = ASCIIToUTF16(chrome::kInstantLearnMoreURL);
+ int instant_message_id = IDS_INSTANT_PREF_WITH_WARNING;
+ if (chrome::search::IsInstantExtendedAPIEnabled(
+ Profile::FromWebUI(web_ui()))) {
+ instant_message_id = IDS_INSTANT_EXTENDED_PREF_WITH_WARNING;
+ values->SetString("instant_enabled", "instant_extended.enabled");
+ } else {
+ values->SetString("instant_enabled", "instant.enabled");
+ }
values->SetString(
"instantPrefAndWarning",
- l10n_util::GetStringFUTF16(IDS_INSTANT_PREF_WITH_WARNING,
- instant_learn_more_url));
+ l10n_util::GetStringFUTF16(instant_message_id, instant_learn_more_url));
values->SetString("instantLearnMoreLink", instant_learn_more_url);
#if defined(OS_CHROMEOS)
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698