| 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 #include "chrome/browser/ui/website_settings/website_settings_ui.h" | 5 #include "chrome/browser/ui/website_settings/website_settings_ui.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 9 #include "chrome/browser/plugins/plugin_utils.h" | 9 #include "chrome/browser/plugins/plugin_utils.h" |
| 10 #include "chrome/browser/plugins/plugins_field_trial.h" | 10 #include "chrome/browser/plugins/plugins_field_trial.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 std::unique_ptr<WebsiteSettingsUI::SecurityDescription> security_description( | 159 std::unique_ptr<WebsiteSettingsUI::SecurityDescription> security_description( |
| 160 new WebsiteSettingsUI::SecurityDescription()); | 160 new WebsiteSettingsUI::SecurityDescription()); |
| 161 | 161 |
| 162 switch (identity_status) { | 162 switch (identity_status) { |
| 163 case WebsiteSettings::SITE_IDENTITY_STATUS_INTERNAL_PAGE: | 163 case WebsiteSettings::SITE_IDENTITY_STATUS_INTERNAL_PAGE: |
| 164 return CreateSecurityDescription(IDS_WEBSITE_SETTINGS_INTERNAL_PAGE, | 164 return CreateSecurityDescription(IDS_WEBSITE_SETTINGS_INTERNAL_PAGE, |
| 165 IDS_WEBSITE_SETTINGS_INTERNAL_PAGE); | 165 IDS_WEBSITE_SETTINGS_INTERNAL_PAGE); |
| 166 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT: | 166 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT: |
| 167 case WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT: | 167 case WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT: |
| 168 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN: | 168 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN: |
| 169 case WebsiteSettings::SITE_IDENTITY_STATUS_CT_ERROR: | |
| 170 case WebsiteSettings::SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT: | 169 case WebsiteSettings::SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT: |
| 171 switch (connection_status) { | 170 switch (connection_status) { |
| 172 case WebsiteSettings:: | 171 case WebsiteSettings:: |
| 173 SITE_CONNECTION_STATUS_INSECURE_ACTIVE_SUBRESOURCE: | 172 SITE_CONNECTION_STATUS_INSECURE_ACTIVE_SUBRESOURCE: |
| 174 return CreateSecurityDescription( | 173 return CreateSecurityDescription( |
| 175 IDS_WEBSITE_SETTINGS_NOT_SECURE_SUMMARY, | 174 IDS_WEBSITE_SETTINGS_NOT_SECURE_SUMMARY, |
| 176 IDS_WEBSITE_SETTINGS_NOT_SECURE_DETAILS); | 175 IDS_WEBSITE_SETTINGS_NOT_SECURE_DETAILS); |
| 177 case WebsiteSettings:: | 176 case WebsiteSettings:: |
| 178 SITE_CONNECTION_STATUS_INSECURE_PASSIVE_SUBRESOURCE: | 177 SITE_CONNECTION_STATUS_INSECURE_PASSIVE_SUBRESOURCE: |
| 179 return CreateSecurityDescription( | 178 return CreateSecurityDescription( |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 case WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT: | 337 case WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT: |
| 339 resource_id = IDR_PAGEINFO_GOOD; | 338 resource_id = IDR_PAGEINFO_GOOD; |
| 340 break; | 339 break; |
| 341 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN: | 340 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN: |
| 342 resource_id = IDR_PAGEINFO_WARNING_MINOR; | 341 resource_id = IDR_PAGEINFO_WARNING_MINOR; |
| 343 break; | 342 break; |
| 344 case WebsiteSettings::SITE_IDENTITY_STATUS_NO_CERT: | 343 case WebsiteSettings::SITE_IDENTITY_STATUS_NO_CERT: |
| 345 resource_id = IDR_PAGEINFO_WARNING_MAJOR; | 344 resource_id = IDR_PAGEINFO_WARNING_MAJOR; |
| 346 break; | 345 break; |
| 347 case WebsiteSettings::SITE_IDENTITY_STATUS_ERROR: | 346 case WebsiteSettings::SITE_IDENTITY_STATUS_ERROR: |
| 348 case WebsiteSettings::SITE_IDENTITY_STATUS_CT_ERROR: | |
| 349 resource_id = IDR_PAGEINFO_BAD; | 347 resource_id = IDR_PAGEINFO_BAD; |
| 350 break; | 348 break; |
| 351 case WebsiteSettings::SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT: | 349 case WebsiteSettings::SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT: |
| 352 resource_id = IDR_PAGEINFO_ENTERPRISE_MANAGED; | 350 resource_id = IDR_PAGEINFO_ENTERPRISE_MANAGED; |
| 353 break; | 351 break; |
| 354 case WebsiteSettings:: | 352 case WebsiteSettings:: |
| 355 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MINOR: | 353 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MINOR: |
| 356 resource_id = IDR_PAGEINFO_WARNING_MINOR; | 354 resource_id = IDR_PAGEINFO_WARNING_MINOR; |
| 357 break; | 355 break; |
| 358 case WebsiteSettings:: | 356 case WebsiteSettings:: |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 } | 395 } |
| 398 return resource_id; | 396 return resource_id; |
| 399 } | 397 } |
| 400 | 398 |
| 401 // static | 399 // static |
| 402 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon( | 400 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon( |
| 403 WebsiteSettings::SiteConnectionStatus status) { | 401 WebsiteSettings::SiteConnectionStatus status) { |
| 404 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 402 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 405 return rb.GetNativeImageNamed(GetConnectionIconID(status)); | 403 return rb.GetNativeImageNamed(GetConnectionIconID(status)); |
| 406 } | 404 } |
| OLD | NEW |