Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1527)

Unified Diff: chrome/browser/ui/website_settings/website_settings.h

Issue 2365553002: Fix a use-after-free in WebsiteSettings::OnUIClosing. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/website_settings/website_settings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/website_settings/website_settings.h
diff --git a/chrome/browser/ui/website_settings/website_settings.h b/chrome/browser/ui/website_settings/website_settings.h
index bfa853740267b146d7af7e28939d42ea8560d4da..f2606784f7e3ab360423194bcda40950bd31e035 100644
--- a/chrome/browser/ui/website_settings/website_settings.h
+++ b/chrome/browser/ui/website_settings/website_settings.h
@@ -11,6 +11,7 @@
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/security_state/security_state_model.h"
+#include "content/public/browser/web_contents_observer.h"
#include "url/gurl.h"
namespace content {
@@ -32,7 +33,8 @@ class WebsiteSettingsUI;
// information and allows users to change the permissions. |WebsiteSettings|
// objects must be created on the heap. They destroy themselves after the UI is
// closed.
-class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver {
+class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver,
+ public content::WebContentsObserver {
public:
// TODO(palmer): Figure out if it is possible to unify SiteConnectionStatus
// and SiteIdentityStatus.
@@ -177,11 +179,6 @@ class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver {
// information (identity, connection status, etc.).
WebsiteSettingsUI* ui_;
-#if !defined(OS_ANDROID)
- // The WebContents of the active tab.
- content::WebContents* web_contents_;
-#endif
-
// The flag that controls whether an infobar is displayed after the website
// settings UI is closed or not.
bool show_info_bar_;
« no previous file with comments | « no previous file | chrome/browser/ui/website_settings/website_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698