Index: chrome/browser/ui/webui/options/content_settings_handler.cc |
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc |
index 0939b0533193b241acc46a97cb7b5e0dbd2d9992..48a875150ee7871f9209446f454748cd9b1909b0 100644 |
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc |
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc |
@@ -497,13 +497,7 @@ |
base::Unretained(this))); |
flash_settings_manager_.reset(new PepperFlashSettingsManager(this, context)); |
- |
- Profile* profile = Profile::FromWebUI(web_ui()); |
- observer_.Add(profile->GetHostContentSettingsMap()); |
- if (profile->HasOffTheRecordProfile()) { |
- observer_.Add( |
- profile->GetOffTheRecordProfile()->GetHostContentSettingsMap()); |
- } |
+ observer_.Add(Profile::FromWebUI(web_ui())->GetHostContentSettingsMap()); |
} |
void ContentSettingsHandler::InitializePage() { |
@@ -535,22 +529,16 @@ |
const content::NotificationDetails& details) { |
switch (type) { |
case chrome::NOTIFICATION_PROFILE_DESTROYED: { |
- Profile* profile = content::Source<Profile>(source).ptr(); |
- if (profile->IsOffTheRecord() && |
- observer_.IsObserving(profile->GetHostContentSettingsMap())) { |
+ if (content::Source<Profile>(source).ptr()->IsOffTheRecord()) { |
web_ui()->CallJavascriptFunction( |
"ContentSettingsExceptionsArea.OTRProfileDestroyed"); |
- observer_.Remove(profile->GetHostContentSettingsMap()); |
} |
break; |
} |
case chrome::NOTIFICATION_PROFILE_CREATED: { |
- Profile* profile = content::Source<Profile>(source).ptr(); |
- if (profile->IsOffTheRecord()) { |
+ if (content::Source<Profile>(source).ptr()->IsOffTheRecord()) |
UpdateAllOTRExceptionsViewsFromModel(); |
- observer_.Add(profile->GetHostContentSettingsMap()); |
- } |
break; |
} |