summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/browser.cc3
-rw-r--r--chrome/browser/host_content_settings_map.cc18
2 files changed, 9 insertions, 12 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index d65674e..fe0648c 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -2649,7 +2649,8 @@ void Browser::ShowRepostFormWarningDialog(TabContents *tab_contents) {
}
void Browser::ShowContentSettingsWindow(ContentSettingsType content_type) {
- window()->ShowContentSettingsWindow(content_type, profile_);
+ window()->ShowContentSettingsWindow(content_type,
+ profile_->GetOriginalProfile());
}
bool Browser::ShouldAddNavigationsToHistory() const {
diff --git a/chrome/browser/host_content_settings_map.cc b/chrome/browser/host_content_settings_map.cc
index 3094477..edb8651 100644
--- a/chrome/browser/host_content_settings_map.cc
+++ b/chrome/browser/host_content_settings_map.cc
@@ -188,11 +188,9 @@ HostContentSettingsMap::HostContentSettingsMap(Profile* profile)
// Read exceptions.
ReadExceptions(false);
- if (!is_off_the_record_) {
- prefs->AddPrefObserver(prefs::kDefaultContentSettings, this);
- prefs->AddPrefObserver(prefs::kContentSettingsPatterns, this);
- prefs->AddPrefObserver(prefs::kBlockThirdPartyCookies, this);
- }
+ prefs->AddPrefObserver(prefs::kDefaultContentSettings, this);
+ prefs->AddPrefObserver(prefs::kContentSettingsPatterns, this);
+ prefs->AddPrefObserver(prefs::kBlockThirdPartyCookies, this);
notification_registrar_.Add(this, NotificationType::PROFILE_DESTROYED,
Source<Profile>(profile_));
}
@@ -607,12 +605,10 @@ void HostContentSettingsMap::UnregisterObservers() {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
if (!profile_)
return;
- if (!is_off_the_record_) {
- PrefService* prefs = profile_->GetPrefs();
- prefs->RemovePrefObserver(prefs::kDefaultContentSettings, this);
- prefs->RemovePrefObserver(prefs::kContentSettingsPatterns, this);
- prefs->RemovePrefObserver(prefs::kBlockThirdPartyCookies, this);
- }
+ PrefService* prefs = profile_->GetPrefs();
+ prefs->RemovePrefObserver(prefs::kDefaultContentSettings, this);
+ prefs->RemovePrefObserver(prefs::kContentSettingsPatterns, this);
+ prefs->RemovePrefObserver(prefs::kBlockThirdPartyCookies, this);
notification_registrar_.Remove(this, NotificationType::PROFILE_DESTROYED,
Source<Profile>(profile_));
profile_ = NULL;