Commit c9c8408f authored by Shrikant Kelkar's avatar Shrikant Kelkar

Revert "Fix a bug where ContentSettingsHandler did not listen for OTR content settings changes."

This reverts commit 3d148e7d.

BUG=417597
TBR=bauerb@chromium.org,dhnishi@chromium.org,cpu@chromium.org

Review URL: https://codereview.chromium.org/595213006

Cr-Commit-Position: refs/heads/master@{#296810}
parent e544e130
...@@ -527,21 +527,16 @@ void ContentSettingsHandler::Observe( ...@@ -527,21 +527,16 @@ void ContentSettingsHandler::Observe(
const content::NotificationDetails& details) { const content::NotificationDetails& details) {
switch (type) { switch (type) {
case chrome::NOTIFICATION_PROFILE_DESTROYED: { case chrome::NOTIFICATION_PROFILE_DESTROYED: {
Profile* profile = content::Source<Profile>(source).ptr(); if (content::Source<Profile>(source).ptr()->IsOffTheRecord()) {
if (profile->IsOffTheRecord()) {
web_ui()->CallJavascriptFunction( web_ui()->CallJavascriptFunction(
"ContentSettingsExceptionsArea.OTRProfileDestroyed"); "ContentSettingsExceptionsArea.OTRProfileDestroyed");
observer_.Remove(profile->GetHostContentSettingsMap());
} }
break; break;
} }
case chrome::NOTIFICATION_PROFILE_CREATED: { case chrome::NOTIFICATION_PROFILE_CREATED: {
Profile* profile = content::Source<Profile>(source).ptr(); if (content::Source<Profile>(source).ptr()->IsOffTheRecord())
if (profile->IsOffTheRecord()) {
UpdateAllOTRExceptionsViewsFromModel(); UpdateAllOTRExceptionsViewsFromModel();
observer_.Add(profile->GetHostContentSettingsMap());
}
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment