Chromium Code Reviews| Index: chrome/browser/ui/cocoa/content_settings_dialog_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/content_settings_dialog_controller.mm b/chrome/browser/ui/cocoa/content_settings_dialog_controller.mm |
| index f61c77a9e7d6944fad6ec4b8812ff72604e0efc7..04171d1957c0d188a2088aaef16981fc64f54c08 100644 |
| --- a/chrome/browser/ui/cocoa/content_settings_dialog_controller.mm |
| +++ b/chrome/browser/ui/cocoa/content_settings_dialog_controller.mm |
| @@ -556,6 +556,11 @@ class PrefObserverDisabler { |
| } |
| } |
| +- (BOOL)geolocationSettingsManaged { |
| + return profile_->GetHostContentSettingsMap()->IsDefaultContentSettingManaged( |
| + CONTENT_SETTINGS_TYPE_GEOLOCATION); |
| +} |
| + |
| - (void)setNotificationsSettingIndex:(NSInteger)value { |
| ContentSetting setting = CONTENT_SETTING_DEFAULT; |
| switch (value) { |
| @@ -571,6 +576,11 @@ class PrefObserverDisabler { |
| setting); |
| } |
| +- (BOOL)notificationsSettingsManaged { |
| + return profile_->GetHostContentSettingsMap()->IsDefaultContentSettingManaged( |
| + CONTENT_SETTINGS_TYPE_NOTIFICATIONS); |
| +} |
| + |
| - (NSInteger)notificationsSettingIndex { |
| ContentSetting setting = |
| profile_->GetDesktopNotificationService()->GetDefaultContentSetting(); |
| @@ -631,10 +641,15 @@ class PrefObserverDisabler { |
| if (prefName == prefs::kGeolocationDefaultContentSetting) { |
| [self willChangeValueForKey:@"geolocationSettingIndex"]; |
| [self didChangeValueForKey:@"geolocationSettingIndex"]; |
| + [self willChangeValueForKey:@"geolocationSettingsManaged"]; |
| + [self didChangeValueForKey:@"geolocationSettinsgManaged"]; |
| + |
|
Nico
2010/12/16 17:50:35
no newline
|
| } |
| if (prefName == prefs::kDesktopNotificationDefaultContentSetting) { |
| [self willChangeValueForKey:@"notificationsSettingIndex"]; |
| [self didChangeValueForKey:@"notificationsSettingIndex"]; |
| + [self willChangeValueForKey:@"notificationsSettingsManaged"]; |
| + [self didChangeValueForKey:@"notificationsSettingsManaged"]; |
| } |
| } |