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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings.h

Issue 1317443002: Fix UAF in Origin Info Bubble and permission settings UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix another Andorid call site. Checked all call sites. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
10 #include "components/content_settings/core/common/content_settings.h" 10 #include "components/content_settings/core/common/content_settings.h"
11 #include "components/content_settings/core/common/content_settings_types.h" 11 #include "components/content_settings/core/common/content_settings_types.h"
12 #include "content/public/common/signed_certificate_timestamp_id_and_status.h" 12 #include "content/public/common/signed_certificate_timestamp_id_and_status.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 14
15 namespace content { 15 namespace content {
16 class CertStore; 16 class CertStore;
17 struct SSLStatus; 17 struct SSLStatus;
18 class WebContents;
18 } 19 }
19 20
20 class ChromeSSLHostStateDelegate; 21 class ChromeSSLHostStateDelegate;
21 class InfoBarService;
22 class HostContentSettingsMap; 22 class HostContentSettingsMap;
23 class Profile; 23 class Profile;
24 class WebsiteSettingsUI; 24 class WebsiteSettingsUI;
25 25
26 // The |WebsiteSettings| provides information about a website's permissions, 26 // The |WebsiteSettings| provides information about a website's permissions,
27 // connection state and its identity. It owns a UI that displays the 27 // connection state and its identity. It owns a UI that displays the
28 // information and allows users to change the permissions. |WebsiteSettings| 28 // information and allows users to change the permissions. |WebsiteSettings|
29 // objects must be created on the heap. They destroy themselves after the UI is 29 // objects must be created on the heap. They destroy themselves after the UI is
30 // closed. 30 // closed.
31 class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver { 31 class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 WEBSITE_SETTINGS_SITE_SETTINGS_OPENED = 9, 85 WEBSITE_SETTINGS_SITE_SETTINGS_OPENED = 9,
86 WEBSITE_SETTINGS_COUNT 86 WEBSITE_SETTINGS_COUNT
87 }; 87 };
88 88
89 // Creates a WebsiteSettings for the passed |url| using the given |ssl| status 89 // Creates a WebsiteSettings for the passed |url| using the given |ssl| status
90 // object to determine the status of the site's connection. The 90 // object to determine the status of the site's connection. The
91 // |WebsiteSettings| takes ownership of the |ui|. 91 // |WebsiteSettings| takes ownership of the |ui|.
92 WebsiteSettings(WebsiteSettingsUI* ui, 92 WebsiteSettings(WebsiteSettingsUI* ui,
93 Profile* profile, 93 Profile* profile,
94 TabSpecificContentSettings* tab_specific_content_settings, 94 TabSpecificContentSettings* tab_specific_content_settings,
95 InfoBarService* infobar_service, 95 content::WebContents* web_contents,
96 const GURL& url, 96 const GURL& url,
97 const content::SSLStatus& ssl, 97 const content::SSLStatus& ssl,
98 content::CertStore* cert_store); 98 content::CertStore* cert_store);
99 ~WebsiteSettings() override; 99 ~WebsiteSettings() override;
100 100
101 void RecordWebsiteSettingsAction(WebsiteSettingsAction action); 101 void RecordWebsiteSettingsAction(WebsiteSettingsAction action);
102 102
103 // This method is called when ever a permission setting is changed. 103 // This method is called when ever a permission setting is changed.
104 void OnSitePermissionChanged(ContentSettingsType type, 104 void OnSitePermissionChanged(ContentSettingsType type,
105 ContentSetting value); 105 ContentSetting value);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // Sets (presents) the information about the site's permissions in the |ui_|. 145 // Sets (presents) the information about the site's permissions in the |ui_|.
146 void PresentSitePermissions(); 146 void PresentSitePermissions();
147 147
148 // Sets (presents) the information about the site's data in the |ui_|. 148 // Sets (presents) the information about the site's data in the |ui_|.
149 void PresentSiteData(); 149 void PresentSiteData();
150 150
151 // Sets (presents) the information about the site's identity and connection 151 // Sets (presents) the information about the site's identity and connection
152 // in the |ui_|. 152 // in the |ui_|.
153 void PresentSiteIdentity(); 153 void PresentSiteIdentity();
154 154
155 // The website settings UI displays information and controls for site 155 // The website settings UI displays information and controls for site-
156 // specific data (local stored objects like cookies), site specific 156 // specific data (local stored objects like cookies), site-specific
157 // permissions (location, popup, plugin, etc. permissions) and site specific 157 // permissions (location, pop-up, plugin, etc. permissions) and site-specific
158 // information (identity, connection status, etc.). 158 // information (identity, connection status, etc.).
159 WebsiteSettingsUI* ui_; 159 WebsiteSettingsUI* ui_;
160 160
161 // The infobar service of the active tab. 161 // The WebContents of the active tab.
162 InfoBarService* infobar_service_; 162 content::WebContents* web_contents_;
163 163
164 // The flag that controls whether an infobar is displayed after the website 164 // The flag that controls whether an infobar is displayed after the website
165 // settings UI is closed or not. 165 // settings UI is closed or not.
166 bool show_info_bar_; 166 bool show_info_bar_;
167 167
168 // The Omnibox URL of the website for which to display site permissions and 168 // The Omnibox URL of the website for which to display site permissions and
169 // site information. 169 // site information.
170 GURL site_url_; 170 GURL site_url_;
171 171
172 // Status of the website's identity verification check. 172 // Status of the website's identity verification check.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // Service for managing SSL error page bypasses. Used to revoke bypass 222 // Service for managing SSL error page bypasses. Used to revoke bypass
223 // decisions by users. 223 // decisions by users.
224 ChromeSSLHostStateDelegate* chrome_ssl_host_state_delegate_; 224 ChromeSSLHostStateDelegate* chrome_ssl_host_state_delegate_;
225 225
226 bool did_revoke_user_ssl_decisions_; 226 bool did_revoke_user_ssl_decisions_;
227 227
228 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings); 228 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings);
229 }; 229 };
230 230
231 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ 231 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698