| 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 cc5a6b1cd9d2125bbca33cf094ebfe495d7d36dd..79df19e767696fb055ca402510f0e1121560a6e0 100644
|
| --- a/chrome/browser/dom_ui/options/content_settings_handler.cc
|
| +++ b/chrome/browser/dom_ui/options/content_settings_handler.cc
|
| @@ -366,8 +366,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);
|
| @@ -389,6 +391,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) {
|
|
|