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 7a5e2f13b4efa8b7735303d1fae2a12a3f301322..fe81dff2fe8c19f337ef1a8981e56ff0ea3ad5ee 100644 |
--- a/chrome/browser/ui/webui/options/core_options_handler.cc |
+++ b/chrome/browser/ui/webui/options/core_options_handler.cc |
@@ -47,9 +47,18 @@ void CoreOptionsHandler::GetLocalizedValues( |
localized_strings->SetString("title", |
l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE)); |
+ string16 options_term = l10n_util::GetStringUTF16(IDS_OPTIONS_PREFS_TERM); |
+ |
// Managed prefs |
- localized_strings->SetString("managedPrefsBannerText", |
- l10n_util::GetStringUTF16(IDS_OPTIONS_MANAGED_PREFS)); |
+ localized_strings->SetString("policyManagedPrefsBannerText", |
Mattias Nissler (ping if slow)
2011/07/13 12:07:58
Not sure whether it's mandatory, but I personally
Evan Stade
2011/07/13 17:06:04
no it is not mandatory, both styles are acceptable
|
+ l10n_util::GetStringFUTF16(IDS_OPTIONS_POLICY_MANAGED_PREFS, |
+ options_term)); |
+ localized_strings->SetString("extensionManagedPrefsBannerText", |
+ l10n_util::GetStringFUTF16(IDS_OPTIONS_EXTENSION_MANAGED_PREFS, |
+ options_term)); |
+ localized_strings->SetString("policyAndExtensionManagedPrefsBannerText", |
+ l10n_util::GetStringFUTF16(IDS_OPTIONS_POLICY_EXTENSION_MANAGED_PREFS, |
+ options_term)); |
// Search |
RegisterTitle(localized_strings, "searchPage", IDS_OPTIONS_SEARCH_PAGE_TITLE); |
@@ -141,8 +150,11 @@ Value* CoreOptionsHandler::FetchPref(const std::string& pref_name) { |
if (pref) { |
DictionaryValue* dict = new DictionaryValue; |
dict->Set("value", pref->GetValue()->DeepCopy()); |
- dict->SetBoolean("managed", pref->IsManaged()); |
- dict->SetBoolean("extensionControlled", pref->IsExtensionControlled()); |
+ if (pref->IsManaged()) { |
Evan Stade
2011/07/13 17:06:04
no curlies
Bernhard Bauer
2011/07/13 22:15:12
Done.
|
+ dict->SetString("controlledBy", "policy"); |
+ } else if (pref->IsExtensionControlled()) { |
+ dict->SetString("controlledBy", "extension"); |
+ } |
Joao da Silva
2011/07/13 17:35:17
The code here that creates the DictionaryValue is
Bernhard Bauer
2011/07/13 22:15:12
Good idea. Done.
|
dict->SetBoolean("disabled", !pref->IsUserModifiable()); |
return_value = dict; |
} else { |
@@ -379,8 +391,11 @@ void CoreOptionsHandler::NotifyPrefChanged(const std::string* pref_name) { |
DictionaryValue* dict = new DictionaryValue; |
dict->Set("value", pref->GetValue()->DeepCopy()); |
- dict->SetBoolean("managed", pref->IsManaged()); |
- dict->SetBoolean("extensionControlled", pref->IsExtensionControlled()); |
+ if (pref->IsManaged()) { |
+ dict->SetString("controlledBy", "policy"); |
+ } else if (pref->IsExtensionControlled()) { |
+ dict->SetString("controlledBy", "extension"); |
+ } |
Joao da Silva
2011/07/13 17:35:17
See comment above.
Bernhard Bauer
2011/07/13 22:15:12
Done.
|
dict->SetBoolean("disabled", !pref->IsUserModifiable()); |
result_value.Append(dict); |