| OLD | NEW |
| 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/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/task/cancelable_task_tracker.h" | 10 #include "base/task/cancelable_task_tracker.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // The site is a trusted internal chrome page. | 64 // The site is a trusted internal chrome page. |
| 65 SITE_IDENTITY_STATUS_INTERNAL_PAGE, | 65 SITE_IDENTITY_STATUS_INTERNAL_PAGE, |
| 66 // The profile has accessed data using an administrator-provided | 66 // The profile has accessed data using an administrator-provided |
| 67 // certificate, so the site might be able to intercept data. | 67 // certificate, so the site might be able to intercept data. |
| 68 SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT, | 68 SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT, |
| 69 // The website provided a valid certificate, but the certificate or chain | 69 // The website provided a valid certificate, but the certificate or chain |
| 70 // is using a deprecated signature algorithm. | 70 // is using a deprecated signature algorithm. |
| 71 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM, | 71 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM, |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 // UMA statistics for WebsiteSettings. Do not reorder or remove existing |
| 75 // fields. |
| 76 enum WebsiteSettingsAction { |
| 77 WEBSITE_SETTINGS_OPENED = 0, |
| 78 WEBSITE_SETTINGS_PERMISSIONS_TAB_SELECTED, |
| 79 WEBSITE_SETTINGS_CONNECTION_TAB_SELECTED, |
| 80 WEBSITE_SETTINGS_CONNECTION_TAB_SHOWN_IMMEDIATELY, |
| 81 WEBSITE_SETTINGS_COOKIES_DIALOG_OPENED, |
| 82 WEBSITE_SETTINGS_CHANGED_PERMISSION, |
| 83 WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED, |
| 84 WEBSITE_SETTINGS_TRANSPARENCY_VIEWER_OPENED, |
| 85 WEBSITE_SETTINGS_CONNECTION_HELP_OPENED, |
| 86 WEBSITE_SETTINGS_COUNT |
| 87 }; |
| 88 |
| 74 // 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 |
| 75 // object to determine the status of the site's connection. The | 90 // object to determine the status of the site's connection. The |
| 76 // |WebsiteSettings| takes ownership of the |ui|. | 91 // |WebsiteSettings| takes ownership of the |ui|. |
| 77 WebsiteSettings(WebsiteSettingsUI* ui, | 92 WebsiteSettings(WebsiteSettingsUI* ui, |
| 78 Profile* profile, | 93 Profile* profile, |
| 79 TabSpecificContentSettings* tab_specific_content_settings, | 94 TabSpecificContentSettings* tab_specific_content_settings, |
| 80 InfoBarService* infobar_service, | 95 InfoBarService* infobar_service, |
| 81 const GURL& url, | 96 const GURL& url, |
| 82 const content::SSLStatus& ssl, | 97 const content::SSLStatus& ssl, |
| 83 content::CertStore* cert_store); | 98 content::CertStore* cert_store); |
| 84 ~WebsiteSettings() override; | 99 ~WebsiteSettings() override; |
| 85 | 100 |
| 101 void RecordWebsiteSettingsAction(WebsiteSettingsAction action); |
| 102 |
| 86 // This method is called when ever a permission setting is changed. | 103 // This method is called when ever a permission setting is changed. |
| 87 void OnSitePermissionChanged(ContentSettingsType type, | 104 void OnSitePermissionChanged(ContentSettingsType type, |
| 88 ContentSetting value); | 105 ContentSetting value); |
| 89 | 106 |
| 90 // Callback used for requests to fetch the number of page visits from history | 107 // Callback used for requests to fetch the number of page visits from history |
| 91 // service and the time of the first visit. | 108 // service and the time of the first visit. |
| 92 void OnGotVisitCountToHost(bool found_visits, | 109 void OnGotVisitCountToHost(bool found_visits, |
| 93 int visit_count, | 110 int visit_count, |
| 94 base::Time first_visit); | 111 base::Time first_visit); |
| 95 | 112 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 // Service for managing SSL error page bypasses. Used to revoke bypass | 237 // Service for managing SSL error page bypasses. Used to revoke bypass |
| 221 // decisions by users. | 238 // decisions by users. |
| 222 ChromeSSLHostStateDelegate* chrome_ssl_host_state_delegate_; | 239 ChromeSSLHostStateDelegate* chrome_ssl_host_state_delegate_; |
| 223 | 240 |
| 224 bool did_revoke_user_ssl_decisions_; | 241 bool did_revoke_user_ssl_decisions_; |
| 225 | 242 |
| 226 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings); | 243 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings); |
| 227 }; | 244 }; |
| 228 | 245 |
| 229 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ | 246 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ |
| OLD | NEW |