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

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

Issue 8480037: Controlled settings indicator and bubble for chrome://preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address James' feedback. Created 9 years, 1 month 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/resources/options/options_page.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/core_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/core_options_handler.cc b/chrome/browser/ui/webui/options/core_options_handler.cc
index da97e4a165b4a9828ab184e9b756bbdceb3c780e..d03f7d79dea87b58fd38b2ff4e9ce6c83303e2ea 100644
--- a/chrome/browser/ui/webui/options/core_options_handler.cc
+++ b/chrome/browser/ui/webui/options/core_options_handler.cc
@@ -62,6 +62,17 @@ void CoreOptionsHandler::GetStaticLocalizedValues(
localized_strings->SetString("policyAndExtensionManagedPrefsBannerText",
l10n_util::GetStringUTF16(IDS_OPTIONS_POLICY_EXTENSION_MANAGED_PREFS));
+ // Controlled settings bubble.
+ localized_strings->SetString("controlledSettingPolicy",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY));
+ localized_strings->SetString("controlledSettingExtension",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_EXTENSION));
+ localized_strings->SetString("controlledSettingRecommended",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_RECOMMENDED));
+ localized_strings->SetString("controlledSettingApplyRecommendation",
+ l10n_util::GetStringUTF16(
+ IDS_OPTIONS_CONTROLLED_SETTING_APPLY_RECOMMENDATION));
+
// Search
RegisterTitle(localized_strings, "searchPage", IDS_OPTIONS_SEARCH_PAGE_TITLE);
localized_strings->SetString("searchPlaceholder",
@@ -261,6 +272,9 @@ DictionaryValue* CoreOptionsHandler::CreateValueForPref(
dict->SetString("controlledBy", "policy");
} else if (controlling_pref->IsExtensionControlled()) {
dict->SetString("controlledBy", "extension");
+ } else if (controlling_pref->IsUserModifiable() &&
+ !controlling_pref->IsDefaultValue()) {
+ dict->SetString("controlledBy", "recommended");
}
dict->SetBoolean("disabled", !controlling_pref->IsUserModifiable());
return dict;
« no previous file with comments | « chrome/browser/resources/options/options_page.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698