| Index: chrome/browser/dom_ui/options/content_settings_handler.cc
|
| diff --git a/chrome/browser/dom_ui/options/content_settings_handler.cc b/chrome/browser/dom_ui/options/content_settings_handler.cc
|
| index 3e5f8d37ba9a3c6d9cd53a8b01092dfe344f1e22..af1b063b405f5c9e15684a0d47f91da4b59b196b 100644
|
| --- a/chrome/browser/dom_ui/options/content_settings_handler.cc
|
| +++ b/chrome/browser/dom_ui/options/content_settings_handler.cc
|
| @@ -368,8 +368,10 @@ void ContentSettingsHandler::Observe(NotificationType type,
|
| void ContentSettingsHandler::UpdateSettingDefaultFromModel(
|
| ContentSettingsType type) {
|
| DictionaryValue filter_settings;
|
| - filter_settings.SetString(ContentSettingsTypeToGroupName(type),
|
| - GetSettingDefaultFromModel(type));
|
| + filter_settings.SetString(ContentSettingsTypeToGroupName(type) + ".value",
|
| + GetSettingDefaultFromModel(type));
|
| + filter_settings.SetBoolean(ContentSettingsTypeToGroupName(type) + ".managed",
|
| + GetDefaultSettingManagedFromModel(type));
|
|
|
| dom_ui_->CallJavascriptFunction(
|
| L"ContentSettings.setContentFilterSettingsValue", filter_settings);
|
| @@ -391,6 +393,19 @@ std::string ContentSettingsHandler::GetSettingDefaultFromModel(
|
| return ContentSettingToString(default_setting);
|
| }
|
|
|
| +bool ContentSettingsHandler::GetDefaultSettingManagedFromModel(
|
| + ContentSettingsType type) {
|
| + if (type == CONTENT_SETTINGS_TYPE_GEOLOCATION) {
|
| + return dom_ui_->GetProfile()->
|
| + GetGeolocationContentSettingsMap()->IsDefaultContentSettingManaged();
|
| + } else if (type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) {
|
| + return dom_ui_->GetProfile()->
|
| + GetDesktopNotificationService()->IsDefaultContentSettingManaged();
|
| + } else {
|
| + return GetContentSettingsMap()->IsDefaultContentSettingManaged(type);
|
| + }
|
| +}
|
| +
|
| void ContentSettingsHandler::UpdateAllExceptionsViewsFromModel() {
|
| for (int type = CONTENT_SETTINGS_TYPE_DEFAULT + 1;
|
| type < CONTENT_SETTINGS_NUM_TYPES; ++type) {
|
|
|