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

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

Issue 136693013: [Hotword] Remove unneeded preferences. Cleaning up look of settings. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: wrong section name in test Created 6 years, 11 months 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
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 d3b50414223adc40b74ed3c7d80a27ed7374fee3..e183e0f0230b8dd4887aacece1b0e8c65fdc7b45 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -45,6 +45,8 @@
#include "chrome/browser/profiles/profile_shortcut_manager.h"
#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/profiles/profiles_state.h"
+#include "chrome/browser/search/hotword_service.h"
+#include "chrome/browser/search/hotword_service_factory.h"
#include "chrome/browser/search/search.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_service.h"
@@ -258,11 +260,10 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
{ "homePageShowHomeButton", IDS_OPTIONS_TOOLBAR_SHOW_HOME_BUTTON },
{ "homePageUseNewTab", IDS_OPTIONS_HOMEPAGE_USE_NEWTAB },
{ "homePageUseURL", IDS_OPTIONS_HOMEPAGE_USE_URL },
- { "hotwordSearchDescription", IDS_HOTWORD_SEARCH_PREF_DESCRIPTION },
- { "hotwordSearchIncognito", IDS_HOTWORD_SEARCH_INCOGNITO_PREF_CHKBOX },
- { "hotwordSearchTimeout", IDS_HOTWORD_SEARCH_TIMEOUT_PREF_CHKBOX },
- { "hotwordSearchTimeoutDescription",
- IDS_HOTWORD_SEARCH_TIMEOUT_PREF_DESCRIPTION },
+ { "hotwordSearchEnable", IDS_HOTWORD_SEARCH_PREF_CHKBOX },
+ { "hotwordConfirmEnable", IDS_HOTWORD_CONFIRM_BUBBLE_ENABLE },
+ { "hotwordConfirmDisable", IDS_HOTWORD_CONFIRM_BUBBLE_DISABLE },
+ { "hotwordConfirmMessage", IDS_HOTWORD_SEARCH_PREF_DESCRIPTION },
{ "importData", IDS_OPTIONS_IMPORT_DATA_BUTTON },
{ "improveBrowsingExperience", IDS_OPTIONS_IMPROVE_BROWSING_EXPERIENCE },
{ "languageAndSpellCheckSettingsButton",
@@ -483,10 +484,9 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
values->SetString(
"defaultSearchGroupLabel",
l10n_util::GetStringFUTF16(IDS_SEARCH_PREF_EXPLANATION, omnibox_url));
- base::string16 hotword_url = base::ASCIIToUTF16(chrome::kHotwordLearnMoreURL);
- values->SetString(
- "hotwordSearchEnable",
- l10n_util::GetStringFUTF16(IDS_HOTWORD_SEARCH_PREF_CHKBOX, hotword_url));
+ values->SetString("hotwordLearnMoreURL", chrome::kHotwordLearnMoreURL);
+ RegisterTitle(values, "hotwordConfirmOverlay",
+ IDS_HOTWORD_SEARCH_PREF_CHKBOX);
#if defined(OS_CHROMEOS)
Profile* profile = Profile::FromWebUI(web_ui());
@@ -496,6 +496,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
chromeos::UserManager::Get()->GetUserByProfile(profile);
if (user && (user->GetType() != chromeos::User::USER_TYPE_GUEST))
username = user->email();
+
}
if (!username.empty())
username = gaia::SanitizeEmail(gaia::CanonicalizeEmail(username));
@@ -1526,17 +1527,13 @@ void BrowserOptionsHandler::RemoveCloudPrintConnectorSection() {
#endif // defined(OS_CHROMEOS)
#endif // defined(ENABLE_FULL_PRINTING)
-void BrowserOptionsHandler::SendHotwordAvailable() {
+void BrowserOptionsHandler::HandleRequestHotwordAvailable(
+ const base::ListValue* args) {
std::string group = base::FieldTrialList::FindFullName("VoiceTrigger");
if (group != "" && group != "Disabled")
web_ui()->CallJavascriptFunction("BrowserOptions.showHotwordSection");
}
-void BrowserOptionsHandler::HandleRequestHotwordAvailable(
- const base::ListValue* args) {
- SendHotwordAvailable();
-}
-
#if defined(OS_CHROMEOS)
void BrowserOptionsHandler::HandleOpenWallpaperManager(
const base::ListValue* args) {
« no previous file with comments | « chrome/browser/search/hotword_service_factory.cc ('k') | chrome/browser/ui/webui/options/settings_app_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698