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

Unified Diff: chrome/browser/ui/cocoa/content_settings_dialog_controller.mm

Issue 5398001: Allow default desktop content settings to be managed via policy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 10 years 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
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"];
}
}

Powered by Google App Engine
This is Rietveld 408576698