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

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

Issue 158143002: Fine tuned availability of hotword plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 10 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
« no previous file with comments | « chrome/browser/ui/webui/app_list/start_page_handler.cc ('k') | chrome/chrome_browser_ui.gypi » ('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 5be4f546fee5583b6d09a5880da2d90686fcdcbf..b648de91a2e1566618397fc9ef614af7fb06d8d5 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -379,6 +379,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_VERY_LONG },
{ "enableContentProtectionAttestation",
IDS_OPTIONS_ENABLE_CONTENT_PROTECTION_ATTESTATION },
+ { "enableHotwordAppList", IDS_OPTIONS_ENABLE_HOTWORD_APP_LIST },
{ "factoryResetHeading", IDS_OPTIONS_FACTORY_RESET_HEADING },
{ "factoryResetTitle", IDS_OPTIONS_FACTORY_RESET },
{ "factoryResetRestart", IDS_OPTIONS_FACTORY_RESET_BUTTON },
@@ -546,6 +547,12 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
magnifier_list->Append(option_partial.release());
values->Set("magnifierList", magnifier_list.release());
+
+ scoped_ptr<base::FundamentalValue> should_show_app_list_hotword(
+ new base::FundamentalValue(
+ HotwordService::DoesHotwordSupportLanguage(profile)));
+ values->Set(
+ "shouldShowAppListHotword", should_show_app_list_hotword.release());
#endif
#if defined(OS_MACOSX)
@@ -867,9 +874,9 @@ void BrowserOptionsHandler::InitializePage() {
"BrowserOptions.enableFactoryResetSection");
}
+ Profile* profile = Profile::FromWebUI(web_ui());
OnAccountPictureManagedChanged(
- policy::ProfilePolicyConnectorFactory::GetForProfile(
- Profile::FromWebUI(web_ui()))->
+ policy::ProfilePolicyConnectorFactory::GetForProfile(profile)->
policy_service()->GetPolicies(
policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME,
std::string()))
« no previous file with comments | « chrome/browser/ui/webui/app_list/start_page_handler.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698