| 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 41478320f4435be1a31734fb1dd6a75ce3c0e25b..d00de826b7c1a7ae63f4c59117194423c8ea8a92 100644
|
| --- a/chrome/browser/ui/webui/options/content_settings_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
|
| @@ -269,7 +269,7 @@ void ContentSettingsHandler::GetLocalizedValues(
|
| void ContentSettingsHandler::Initialize() {
|
| const HostContentSettingsMap* settings_map = GetContentSettingsMap();
|
| notification_registrar_.Add(
|
| - this, chrome::NOTIFICATION_OTR_PROFILE_CREATED,
|
| + this, chrome::NOTIFICATION_PROFILE_CREATED,
|
| NotificationService::AllSources());
|
| notification_registrar_.Add(
|
| this, chrome::NOTIFICATION_PROFILE_DESTROYED,
|
| @@ -301,16 +301,16 @@ void ContentSettingsHandler::Observe(int type,
|
| const NotificationDetails& details) {
|
| switch (type) {
|
| case chrome::NOTIFICATION_PROFILE_DESTROYED: {
|
| - Profile* profile = static_cast<Source<Profile> >(source).ptr();
|
| - if (profile->IsOffTheRecord()) {
|
| + if (Source<Profile>(source).ptr()->IsOffTheRecord()) {
|
| web_ui_->CallJavascriptFunction(
|
| "ContentSettingsExceptionsArea.OTRProfileDestroyed");
|
| }
|
| break;
|
| }
|
|
|
| - case chrome::NOTIFICATION_OTR_PROFILE_CREATED: {
|
| - UpdateAllOTRExceptionsViewsFromModel();
|
| + case chrome::NOTIFICATION_PROFILE_CREATED: {
|
| + if (Source<Profile>(source).ptr()->IsOffTheRecord())
|
| + UpdateAllOTRExceptionsViewsFromModel();
|
| break;
|
| }
|
|
|
|
|