OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/content_settings/content_settings_policy_provider.h" | 5 #include "chrome/browser/content_settings/content_settings_policy_provider.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 pref_change_registrar_.Add(prefs::kManagedJavaScriptBlockedForUrls, callback); | 209 pref_change_registrar_.Add(prefs::kManagedJavaScriptBlockedForUrls, callback); |
210 pref_change_registrar_.Add(prefs::kManagedJavaScriptAllowedForUrls, callback); | 210 pref_change_registrar_.Add(prefs::kManagedJavaScriptAllowedForUrls, callback); |
211 pref_change_registrar_.Add(prefs::kManagedPluginsBlockedForUrls, callback); | 211 pref_change_registrar_.Add(prefs::kManagedPluginsBlockedForUrls, callback); |
212 pref_change_registrar_.Add(prefs::kManagedPluginsAllowedForUrls, callback); | 212 pref_change_registrar_.Add(prefs::kManagedPluginsAllowedForUrls, callback); |
213 pref_change_registrar_.Add(prefs::kManagedPopupsBlockedForUrls, callback); | 213 pref_change_registrar_.Add(prefs::kManagedPopupsBlockedForUrls, callback); |
214 pref_change_registrar_.Add(prefs::kManagedPopupsAllowedForUrls, callback); | 214 pref_change_registrar_.Add(prefs::kManagedPopupsAllowedForUrls, callback); |
215 pref_change_registrar_.Add( | 215 pref_change_registrar_.Add( |
216 prefs::kManagedNotificationsAllowedForUrls, callback); | 216 prefs::kManagedNotificationsAllowedForUrls, callback); |
217 pref_change_registrar_.Add( | 217 pref_change_registrar_.Add( |
218 prefs::kManagedNotificationsBlockedForUrls, callback); | 218 prefs::kManagedNotificationsBlockedForUrls, callback); |
219 // The following preferences are only used to indicate if a | 219 // The following preferences are only used to indicate if a default content |
220 // default content setting is managed and to hold the managed default setting | 220 // setting is managed and to hold the managed default setting value. If the |
221 // value. If the value for any of the following perferences is set then the | 221 // value for any of the following preferences is set then the corresponding |
222 // corresponding default content setting is managed. These preferences exist | 222 // default content setting is managed. These preferences exist in parallel to |
223 // in parallel to the preference default content settings. If a | 223 // the preference default content settings. If a default content settings type |
224 // default content settings type is managed any user defined excpetions | 224 // is managed any user defined exceptions (patterns) for this type are |
225 // (patterns) for this type are ignored. | 225 // ignored. |
226 pref_change_registrar_.Add(prefs::kManagedDefaultCookiesSetting, callback); | 226 pref_change_registrar_.Add(prefs::kManagedDefaultCookiesSetting, callback); |
227 pref_change_registrar_.Add(prefs::kManagedDefaultImagesSetting, callback); | 227 pref_change_registrar_.Add(prefs::kManagedDefaultImagesSetting, callback); |
228 pref_change_registrar_.Add(prefs::kManagedDefaultJavaScriptSetting, callback); | 228 pref_change_registrar_.Add(prefs::kManagedDefaultJavaScriptSetting, callback); |
229 pref_change_registrar_.Add(prefs::kManagedDefaultPluginsSetting, callback); | 229 pref_change_registrar_.Add(prefs::kManagedDefaultPluginsSetting, callback); |
230 pref_change_registrar_.Add(prefs::kManagedDefaultPopupsSetting, callback); | 230 pref_change_registrar_.Add(prefs::kManagedDefaultPopupsSetting, callback); |
231 pref_change_registrar_.Add( | 231 pref_change_registrar_.Add( |
232 prefs::kManagedDefaultGeolocationSetting, callback); | 232 prefs::kManagedDefaultGeolocationSetting, callback); |
233 pref_change_registrar_.Add( | 233 pref_change_registrar_.Add( |
234 prefs::kManagedDefaultNotificationsSetting, callback); | 234 prefs::kManagedDefaultNotificationsSetting, callback); |
235 pref_change_registrar_.Add( | 235 pref_change_registrar_.Add( |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 ReadManagedDefaultSettings(); | 492 ReadManagedDefaultSettings(); |
493 } | 493 } |
494 | 494 |
495 NotifyObservers(ContentSettingsPattern(), | 495 NotifyObservers(ContentSettingsPattern(), |
496 ContentSettingsPattern(), | 496 ContentSettingsPattern(), |
497 CONTENT_SETTINGS_TYPE_DEFAULT, | 497 CONTENT_SETTINGS_TYPE_DEFAULT, |
498 std::string()); | 498 std::string()); |
499 } | 499 } |
500 | 500 |
501 } // namespace content_settings | 501 } // namespace content_settings |
OLD | NEW |