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

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

Issue 2448943002: Refactor SecurityStateModel/Clients for simplicity and reusability. (Closed)
Patch Set: fix DEPS. Created 4 years, 1 month 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/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
11 #include "components/content_settings/core/common/content_settings.h" 11 #include "components/content_settings/core/common/content_settings.h"
12 #include "components/content_settings/core/common/content_settings_types.h" 12 #include "components/content_settings/core/common/content_settings_types.h"
13 #include "components/security_state/security_state_model.h" 13 #include "components/security_state/core/security_state.h"
14 #include "content/public/browser/web_contents_observer.h" 14 #include "content/public/browser/web_contents_observer.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace content { 17 namespace content {
18 class WebContents; 18 class WebContents;
19 } 19 }
20 20
21 namespace net { 21 namespace net {
22 class X509Certificate; 22 class X509Certificate;
23 } 23 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 int blocked_icon_id; 107 int blocked_icon_id;
108 int allowed_icon_id; 108 int allowed_icon_id;
109 int label_string_id; 109 int label_string_id;
110 int delete_tooltip_string_id; 110 int delete_tooltip_string_id;
111 const char* ui_name_key; 111 const char* ui_name_key;
112 }; 112 };
113 113
114 // Creates a WebsiteSettings for the passed |url| using the given |ssl| status 114 // Creates a WebsiteSettings for the passed |url| using the given |ssl| status
115 // object to determine the status of the site's connection. The 115 // object to determine the status of the site's connection. The
116 // |WebsiteSettings| takes ownership of the |ui|. 116 // |WebsiteSettings| takes ownership of the |ui|.
117 WebsiteSettings( 117 WebsiteSettings(WebsiteSettingsUI* ui,
118 WebsiteSettingsUI* ui, 118 Profile* profile,
119 Profile* profile, 119 TabSpecificContentSettings* tab_specific_content_settings,
120 TabSpecificContentSettings* tab_specific_content_settings, 120 content::WebContents* web_contents,
121 content::WebContents* web_contents, 121 const GURL& url,
122 const GURL& url, 122 const security_state::SecurityInfo& security_info);
123 const security_state::SecurityStateModel::SecurityInfo& security_info);
124 ~WebsiteSettings() override; 123 ~WebsiteSettings() override;
125 124
126 void RecordWebsiteSettingsAction(WebsiteSettingsAction action); 125 void RecordWebsiteSettingsAction(WebsiteSettingsAction action);
127 126
128 // This method is called when ever a permission setting is changed. 127 // This method is called when ever a permission setting is changed.
129 void OnSitePermissionChanged(ContentSettingsType type, 128 void OnSitePermissionChanged(ContentSettingsType type,
130 ContentSetting value); 129 ContentSetting value);
131 130
132 // This method is called whenever access to an object is revoked. 131 // This method is called whenever access to an object is revoked.
133 void OnSiteChosenObjectDeleted(const ChooserUIInfo& ui_info, 132 void OnSiteChosenObjectDeleted(const ChooserUIInfo& ui_info,
(...skipping 18 matching lines...) Expand all
152 151
153 base::string16 organization_name() const { 152 base::string16 organization_name() const {
154 return organization_name_; 153 return organization_name_;
155 } 154 }
156 155
157 // SiteDataObserver implementation. 156 // SiteDataObserver implementation.
158 void OnSiteDataAccessed() override; 157 void OnSiteDataAccessed() override;
159 158
160 private: 159 private:
161 // Initializes the |WebsiteSettings|. 160 // Initializes the |WebsiteSettings|.
162 void Init( 161 void Init(const GURL& url, const security_state::SecurityInfo& security_info);
163 const GURL& url,
164 const security_state::SecurityStateModel::SecurityInfo& security_info);
165 162
166 // Sets (presents) the information about the site's permissions in the |ui_|. 163 // Sets (presents) the information about the site's permissions in the |ui_|.
167 void PresentSitePermissions(); 164 void PresentSitePermissions();
168 165
169 // Sets (presents) the information about the site's data in the |ui_|. 166 // Sets (presents) the information about the site's data in the |ui_|.
170 void PresentSiteData(); 167 void PresentSiteData();
171 168
172 // Sets (presents) the information about the site's identity and connection 169 // Sets (presents) the information about the site's identity and connection
173 // in the |ui_|. 170 // in the |ui_|.
174 void PresentSiteIdentity(); 171 void PresentSiteIdentity();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 HostContentSettingsMap* content_settings_; 226 HostContentSettingsMap* content_settings_;
230 227
231 // Service for managing SSL error page bypasses. Used to revoke bypass 228 // Service for managing SSL error page bypasses. Used to revoke bypass
232 // decisions by users. 229 // decisions by users.
233 ChromeSSLHostStateDelegate* chrome_ssl_host_state_delegate_; 230 ChromeSSLHostStateDelegate* chrome_ssl_host_state_delegate_;
234 231
235 bool did_revoke_user_ssl_decisions_; 232 bool did_revoke_user_ssl_decisions_;
236 233
237 Profile* profile_; 234 Profile* profile_;
238 235
239 security_state::SecurityStateModel::SecurityLevel security_level_; 236 security_state::SecurityLevel security_level_;
240 237
241 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings); 238 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings);
242 }; 239 };
243 240
244 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ 241 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698