| 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/grit/chromium_strings.h" | 8 #include "chrome/grit/chromium_strings.h" |
| 9 #include "chrome/grit/generated_resources.h" | 9 #include "chrome/grit/generated_resources.h" |
| 10 #include "components/content_settings/core/browser/plugins_field_trial.h" | 10 #include "components/content_settings/core/browser/plugins_field_trial.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 } | 144 } |
| 145 | 145 |
| 146 WebsiteSettingsUI::IdentityInfo::~IdentityInfo() {} | 146 WebsiteSettingsUI::IdentityInfo::~IdentityInfo() {} |
| 147 | 147 |
| 148 base::string16 WebsiteSettingsUI::IdentityInfo::GetSecuritySummary() const { | 148 base::string16 WebsiteSettingsUI::IdentityInfo::GetSecuritySummary() const { |
| 149 switch (identity_status) { | 149 switch (identity_status) { |
| 150 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT: | 150 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT: |
| 151 case WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT: | 151 case WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT: |
| 152 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN: | 152 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN: |
| 153 switch (connection_status) { | 153 switch (connection_status) { |
| 154 case WebsiteSettings::SITE_CONNECTION_STATUS_MIXED_CONTENT: | 154 case WebsiteSettings:: |
| 155 SITE_CONNECTION_STATUS_INSECURE_PASSIVE_SUBRESOURCE: |
| 155 return l10n_util::GetStringUTF16( | 156 return l10n_util::GetStringUTF16( |
| 156 IDS_WEBSITE_SETTINGS_MIXED_PASSIVE_CONTENT); | 157 IDS_WEBSITE_SETTINGS_INSECURE_PASSIVE_CONTENT); |
| 157 case WebsiteSettings::SITE_CONNECTION_STATUS_MIXED_SCRIPT: | 158 case WebsiteSettings:: |
| 159 SITE_CONNECTION_STATUS_INSECURE_ACTIVE_SUBRESOURCE: |
| 158 return l10n_util::GetStringUTF16( | 160 return l10n_util::GetStringUTF16( |
| 159 IDS_WEBSITE_SETTINGS_MIXED_ACTIVE_CONTENT); | 161 IDS_WEBSITE_SETTINGS_INSECURE_ACTIVE_CONTENT); |
| 160 default: | 162 default: |
| 161 return l10n_util::GetStringUTF16( | 163 return l10n_util::GetStringUTF16( |
| 162 IDS_WEBSITE_SETTINGS_SECURE_TRANSPORT); | 164 IDS_WEBSITE_SETTINGS_SECURE_TRANSPORT); |
| 163 } | 165 } |
| 164 case WebsiteSettings:: | 166 case WebsiteSettings:: |
| 165 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MINOR: | 167 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MINOR: |
| 166 case WebsiteSettings:: | 168 case WebsiteSettings:: |
| 167 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MAJOR: | 169 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MAJOR: |
| 168 return l10n_util::GetStringUTF16( | 170 return l10n_util::GetStringUTF16( |
| 169 IDS_WEBSITE_DEPRECATED_SIGNATURE_ALGORITHM); | 171 IDS_WEBSITE_DEPRECATED_SIGNATURE_ALGORITHM); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 int WebsiteSettingsUI::GetConnectionIconID( | 345 int WebsiteSettingsUI::GetConnectionIconID( |
| 344 WebsiteSettings::SiteConnectionStatus status) { | 346 WebsiteSettings::SiteConnectionStatus status) { |
| 345 int resource_id = IDR_PAGEINFO_INFO; | 347 int resource_id = IDR_PAGEINFO_INFO; |
| 346 switch (status) { | 348 switch (status) { |
| 347 case WebsiteSettings::SITE_CONNECTION_STATUS_UNKNOWN: | 349 case WebsiteSettings::SITE_CONNECTION_STATUS_UNKNOWN: |
| 348 case WebsiteSettings::SITE_CONNECTION_STATUS_INTERNAL_PAGE: | 350 case WebsiteSettings::SITE_CONNECTION_STATUS_INTERNAL_PAGE: |
| 349 break; | 351 break; |
| 350 case WebsiteSettings::SITE_CONNECTION_STATUS_ENCRYPTED: | 352 case WebsiteSettings::SITE_CONNECTION_STATUS_ENCRYPTED: |
| 351 resource_id = IDR_PAGEINFO_GOOD; | 353 resource_id = IDR_PAGEINFO_GOOD; |
| 352 break; | 354 break; |
| 353 case WebsiteSettings::SITE_CONNECTION_STATUS_MIXED_CONTENT: | 355 case WebsiteSettings::SITE_CONNECTION_STATUS_INSECURE_PASSIVE_SUBRESOURCE: |
| 354 resource_id = IDR_PAGEINFO_WARNING_MINOR; | 356 resource_id = IDR_PAGEINFO_WARNING_MINOR; |
| 355 break; | 357 break; |
| 356 case WebsiteSettings::SITE_CONNECTION_STATUS_UNENCRYPTED: | 358 case WebsiteSettings::SITE_CONNECTION_STATUS_UNENCRYPTED: |
| 357 resource_id = IDR_PAGEINFO_WARNING_MAJOR; | 359 resource_id = IDR_PAGEINFO_WARNING_MAJOR; |
| 358 break; | 360 break; |
| 359 case WebsiteSettings::SITE_CONNECTION_STATUS_MIXED_SCRIPT: | 361 case WebsiteSettings::SITE_CONNECTION_STATUS_INSECURE_ACTIVE_SUBRESOURCE: |
| 360 case WebsiteSettings::SITE_CONNECTION_STATUS_ENCRYPTED_ERROR: | 362 case WebsiteSettings::SITE_CONNECTION_STATUS_ENCRYPTED_ERROR: |
| 361 resource_id = IDR_PAGEINFO_BAD; | 363 resource_id = IDR_PAGEINFO_BAD; |
| 362 break; | 364 break; |
| 363 } | 365 } |
| 364 return resource_id; | 366 return resource_id; |
| 365 } | 367 } |
| 366 | 368 |
| 367 // static | 369 // static |
| 368 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon( | 370 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon( |
| 369 WebsiteSettings::SiteConnectionStatus status) { | 371 WebsiteSettings::SiteConnectionStatus status) { |
| 370 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 372 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 371 return rb.GetNativeImageNamed(GetConnectionIconID(status)); | 373 return rb.GetNativeImageNamed(GetConnectionIconID(status)); |
| 372 } | 374 } |
| OLD | NEW |