| Index: chrome/browser/content_settings/content_settings_policy_provider.cc
|
| diff --git a/chrome/browser/content_settings/content_settings_policy_provider.cc b/chrome/browser/content_settings/content_settings_policy_provider.cc
|
| index a13ca7724a898b9690856df2a28af3a53cf49f33..b81f4cd0e095a6ad1aa77f95ab42632b6097cbb8 100644
|
| --- a/chrome/browser/content_settings/content_settings_policy_provider.cc
|
| +++ b/chrome/browser/content_settings/content_settings_policy_provider.cc
|
| @@ -277,12 +277,12 @@ void PolicyProvider::RegisterUserPrefs(PrefService* prefs) {
|
| PrefService::UNSYNCABLE_PREF);
|
| }
|
|
|
| -PolicyProvider::PolicyProvider(HostContentSettingsMap* map,
|
| +PolicyProvider::PolicyProvider(Observer* observer,
|
| PrefService* prefs,
|
| DefaultProviderInterface* default_provider)
|
| - : host_content_settings_map_(map),
|
| - prefs_(prefs),
|
| + : prefs_(prefs),
|
| default_provider_(default_provider) {
|
| + AddObserver(observer);
|
| ReadManagedContentSettings(false);
|
|
|
| pref_change_registrar_.Init(prefs_);
|
| @@ -428,22 +428,11 @@ void PolicyProvider::ClearAllContentSettingsRules(
|
|
|
| void PolicyProvider::ShutdownOnUIThread() {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + RemoveAllObserver();
|
| if (!prefs_)
|
| return;
|
| pref_change_registrar_.RemoveAll();
|
| prefs_ = NULL;
|
| - host_content_settings_map_ = NULL;
|
| -}
|
| -
|
| -void PolicyProvider::NotifyObservers(
|
| - const ContentSettingsDetails& details) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| - if (host_content_settings_map_ == NULL)
|
| - return;
|
| - NotificationService::current()->Notify(
|
| - chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED,
|
| - Source<HostContentSettingsMap>(host_content_settings_map_),
|
| - Details<const ContentSettingsDetails>(&details));
|
| }
|
|
|
| void PolicyProvider::Observe(int type,
|
|
|