| Index: chrome/browser/ui/content_settings/content_setting_bubble_model.cc
|
| diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
|
| index 525410cd7ac64bbe61a81541991868d353fb70cb..1ac88d4f98ea1e825c7f92483c0147fe9cd4f95f 100644
|
| --- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
|
| +++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
|
| @@ -976,7 +976,9 @@ ContentSettingMixedScriptBubbleModel::ContentSettingMixedScriptBubbleModel(
|
| }
|
|
|
| void ContentSettingMixedScriptBubbleModel::OnCustomLinkClicked() {
|
| - DCHECK(web_contents());
|
| + if (!web_contents())
|
| + return;
|
| +
|
| web_contents()->SendToAllFrames(
|
| new ChromeViewMsg_SetAllowRunningInsecureContent(MSG_ROUTING_NONE, true));
|
| web_contents()->GetMainFrame()->Send(new ChromeViewMsg_ReloadFrame(
|
| @@ -1079,6 +1081,9 @@ void ContentSettingRPHBubbleModel::OnRadioClicked(int radio_index) {
|
| }
|
|
|
| void ContentSettingRPHBubbleModel::OnDoneClicked() {
|
| + if (!web_contents())
|
| + return;
|
| +
|
| // The user has one chance to deal with the RPH content setting UI,
|
| // then we remove it.
|
| TabSpecificContentSettings::FromWebContents(web_contents())->
|
| @@ -1090,6 +1095,9 @@ void ContentSettingRPHBubbleModel::OnDoneClicked() {
|
| }
|
|
|
| void ContentSettingRPHBubbleModel::RegisterProtocolHandler() {
|
| + if (!web_contents())
|
| + return;
|
| +
|
| // A no-op if the handler hasn't been ignored, but needed in case the user
|
| // selects sequences like register/ignore/register.
|
| registry_->RemoveIgnoredHandler(pending_handler_);
|
| @@ -1100,6 +1108,9 @@ void ContentSettingRPHBubbleModel::RegisterProtocolHandler() {
|
| }
|
|
|
| void ContentSettingRPHBubbleModel::UnregisterProtocolHandler() {
|
| + if (!web_contents())
|
| + return;
|
| +
|
| registry_->OnDenyRegisterProtocolHandler(pending_handler_);
|
| TabSpecificContentSettings::FromWebContents(web_contents())->
|
| set_pending_protocol_handler_setting(CONTENT_SETTING_BLOCK);
|
| @@ -1107,6 +1118,9 @@ void ContentSettingRPHBubbleModel::UnregisterProtocolHandler() {
|
| }
|
|
|
| void ContentSettingRPHBubbleModel::IgnoreProtocolHandler() {
|
| + if (!web_contents())
|
| + return;
|
| +
|
| registry_->OnIgnoreRegisterProtocolHandler(pending_handler_);
|
| TabSpecificContentSettings::FromWebContents(web_contents())->
|
| set_pending_protocol_handler_setting(CONTENT_SETTING_DEFAULT);
|
|
|