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

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

Issue 1314953009: Refactor WebsiteSettings to operate on a SecurityInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 "chrome/browser/ssl/security_state_model.h"
10 #include "components/content_settings/core/common/content_settings.h" 11 #include "components/content_settings/core/common/content_settings.h"
11 #include "components/content_settings/core/common/content_settings_types.h" 12 #include "components/content_settings/core/common/content_settings_types.h"
12 #include "content/public/common/signed_certificate_timestamp_id_and_status.h" 13 #include "content/public/common/signed_certificate_timestamp_id_and_status.h"
13 #include "url/gurl.h" 14 #include "url/gurl.h"
14 15
15 namespace content { 16 namespace content {
16 class CertStore; 17 class CertStore;
17 struct SSLStatus;
18 class WebContents; 18 class WebContents;
19 } 19 }
20 20
21 class ChromeSSLHostStateDelegate; 21 class ChromeSSLHostStateDelegate;
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
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 }; 88 };
89 89
90 // Creates a WebsiteSettings for the passed |url| using the given |ssl| status 90 // Creates a WebsiteSettings for the passed |url| using the given |ssl| status
91 // object to determine the status of the site's connection. The 91 // object to determine the status of the site's connection. The
92 // |WebsiteSettings| takes ownership of the |ui|. 92 // |WebsiteSettings| takes ownership of the |ui|.
93 WebsiteSettings(WebsiteSettingsUI* ui, 93 WebsiteSettings(WebsiteSettingsUI* ui,
94 Profile* profile, 94 Profile* profile,
95 TabSpecificContentSettings* tab_specific_content_settings, 95 TabSpecificContentSettings* tab_specific_content_settings,
96 content::WebContents* web_contents, 96 content::WebContents* web_contents,
97 const GURL& url, 97 const GURL& url,
98 const content::SSLStatus& ssl, 98 const SecurityStateModel::SecurityInfo& security_info,
99 content::CertStore* cert_store); 99 content::CertStore* cert_store);
100 ~WebsiteSettings() override; 100 ~WebsiteSettings() override;
101 101
102 void RecordWebsiteSettingsAction(WebsiteSettingsAction action); 102 void RecordWebsiteSettingsAction(WebsiteSettingsAction action);
103 103
104 // This method is called when ever a permission setting is changed. 104 // This method is called when ever a permission setting is changed.
105 void OnSitePermissionChanged(ContentSettingsType type, 105 void OnSitePermissionChanged(ContentSettingsType type,
106 ContentSetting value); 106 ContentSetting value);
107 107
108 // This method is called by the UI when the UI is closing. 108 // This method is called by the UI when the UI is closing.
(...skipping 23 matching lines...) Expand all
132 132
133 base::string16 organization_name() const { 133 base::string16 organization_name() const {
134 return organization_name_; 134 return organization_name_;
135 } 135 }
136 136
137 // SiteDataObserver implementation. 137 // SiteDataObserver implementation.
138 void OnSiteDataAccessed() override; 138 void OnSiteDataAccessed() override;
139 139
140 private: 140 private:
141 // Initializes the |WebsiteSettings|. 141 // Initializes the |WebsiteSettings|.
142 void Init(const GURL& url, const content::SSLStatus& ssl); 142 void Init(const GURL& url,
143 const SecurityStateModel::SecurityInfo& security_info);
143 144
144 // 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_|.
145 void PresentSitePermissions(); 146 void PresentSitePermissions();
146 147
147 // 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_|.
148 void PresentSiteData(); 149 void PresentSiteData();
149 150
150 // Sets (presents) the information about the site's identity and connection 151 // Sets (presents) the information about the site's identity and connection
151 // in the |ui_|. 152 // in the |ui_|.
152 void PresentSiteIdentity(); 153 void PresentSiteIdentity();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 ChromeSSLHostStateDelegate* chrome_ssl_host_state_delegate_; 224 ChromeSSLHostStateDelegate* chrome_ssl_host_state_delegate_;
224 225
225 bool did_revoke_user_ssl_decisions_; 226 bool did_revoke_user_ssl_decisions_;
226 227
227 Profile* profile_; 228 Profile* profile_;
228 229
229 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings); 230 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings);
230 }; 231 };
231 232
232 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ 233 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698