Chromium Code Reviews| Index: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc |
| diff --git a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc |
| index 3e88743b8180dee9f261bc65505515b0344f9c04..0744f7900e183521445d7137f85958b11bd8b626 100644 |
| --- a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc |
| +++ b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc |
| @@ -314,7 +314,8 @@ WebsiteSettingsPopupView::WebsiteSettingsPopupView( |
| content::WebContents* web_contents, |
| const GURL& url, |
| const content::SSLStatus& ssl) |
| - : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT), |
| + : content::WebContentsObserver(web_contents), |
| + BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT), |
| web_contents_(web_contents), |
| header_(nullptr), |
| tabbed_pane_(nullptr), |
| @@ -386,6 +387,14 @@ WebsiteSettingsPopupView::WebsiteSettingsPopupView( |
| content::CertStore::GetInstance())); |
| } |
| +void WebsiteSettingsPopupView::RenderFrameDeleted( |
|
felt
2015/08/25 18:20:08
In addition to fixing the UAF, will this also fix
|
| + content::RenderFrameHost* render_frame_host) { |
| + if (render_frame_host == web_contents_->GetMainFrame()) { |
| + presenter_->DoNotShowInfoBar(); |
| + GetWidget()->Close(); |
| + } |
| +} |
| + |
| void WebsiteSettingsPopupView::OnPermissionChanged( |
| const WebsiteSettingsUI::PermissionInfo& permission) { |
| presenter_->OnSitePermissionChanged(permission.type, permission.setting); |