| 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.h" | 5 #include "chrome/browser/ui/website_settings/website_settings.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 UTF8ToUTF16(certificate_->issuer().GetDisplayName())); | 486 UTF8ToUTF16(certificate_->issuer().GetDisplayName())); |
| 487 if (issuer_name.empty()) { | 487 if (issuer_name.empty()) { |
| 488 issuer_name.assign(l10n_util::GetStringUTF16( | 488 issuer_name.assign(l10n_util::GetStringUTF16( |
| 489 IDS_PAGE_INFO_SECURITY_TAB_UNKNOWN_PARTY)); | 489 IDS_PAGE_INFO_SECURITY_TAB_UNKNOWN_PARTY)); |
| 490 } | 490 } |
| 491 | 491 |
| 492 site_identity_details_.assign(l10n_util::GetStringFUTF16( | 492 site_identity_details_.assign(l10n_util::GetStringFUTF16( |
| 493 IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_VERIFIED, issuer_name)); | 493 IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_VERIFIED, issuer_name)); |
| 494 } | 494 } |
| 495 switch (security_info.sha1_deprecation_status) { | 495 switch (security_info.sha1_deprecation_status) { |
| 496 case security_state::DEPRECATED_SHA1_MINOR: | 496 case security_state::DEPRECATED_SHA1: |
| 497 site_identity_status_ = | 497 site_identity_status_ = |
| 498 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MINOR; | 498 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM; |
| 499 site_identity_details_ += | 499 site_identity_details_ += |
| 500 UTF8ToUTF16("\n\n") + | 500 UTF8ToUTF16("\n\n") + |
| 501 l10n_util::GetStringUTF16( | 501 l10n_util::GetStringUTF16( |
| 502 IDS_PAGE_INFO_SECURITY_TAB_DEPRECATED_SIGNATURE_ALGORITHM_MINO
R); | 502 IDS_PAGE_INFO_SECURITY_TAB_DEPRECATED_SIGNATURE_ALGORITHM); |
| 503 break; | |
| 504 case security_state::DEPRECATED_SHA1_MAJOR: | |
| 505 site_identity_status_ = | |
| 506 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MAJOR; | |
| 507 site_identity_details_ += | |
| 508 UTF8ToUTF16("\n\n") + | |
| 509 l10n_util::GetStringUTF16( | |
| 510 IDS_PAGE_INFO_SECURITY_TAB_DEPRECATED_SIGNATURE_ALGORITHM_MAJO
R); | |
| 511 break; | 503 break; |
| 512 case security_state::NO_DEPRECATED_SHA1: | 504 case security_state::NO_DEPRECATED_SHA1: |
| 513 // Nothing to do. | 505 // Nothing to do. |
| 514 break; | 506 break; |
| 515 case security_state::UNKNOWN_SHA1: | 507 case security_state::UNKNOWN_SHA1: |
| 516 // UNKNOWN_SHA1 should only appear when certificate info has not been | 508 // UNKNOWN_SHA1 should only appear when certificate info has not been |
| 517 // initialized, in which case this if-statement should not be running | 509 // initialized, in which case this if-statement should not be running |
| 518 // because there is no other cert info. | 510 // because there is no other cert info. |
| 519 NOTREACHED(); | 511 NOTREACHED(); |
| 520 } | 512 } |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 WebsiteSettingsUI::TabId tab_id = WebsiteSettingsUI::TAB_ID_PERMISSIONS; | 668 WebsiteSettingsUI::TabId tab_id = WebsiteSettingsUI::TAB_ID_PERMISSIONS; |
| 677 if (site_connection_status_ == SITE_CONNECTION_STATUS_ENCRYPTED_ERROR || | 669 if (site_connection_status_ == SITE_CONNECTION_STATUS_ENCRYPTED_ERROR || |
| 678 site_connection_status_ == | 670 site_connection_status_ == |
| 679 SITE_CONNECTION_STATUS_INSECURE_PASSIVE_SUBRESOURCE || | 671 SITE_CONNECTION_STATUS_INSECURE_PASSIVE_SUBRESOURCE || |
| 680 site_connection_status_ == | 672 site_connection_status_ == |
| 681 SITE_CONNECTION_STATUS_INSECURE_ACTIVE_SUBRESOURCE || | 673 SITE_CONNECTION_STATUS_INSECURE_ACTIVE_SUBRESOURCE || |
| 682 site_identity_status_ == SITE_IDENTITY_STATUS_ERROR || | 674 site_identity_status_ == SITE_IDENTITY_STATUS_ERROR || |
| 683 site_identity_status_ == SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN || | 675 site_identity_status_ == SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN || |
| 684 site_identity_status_ == SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT || | 676 site_identity_status_ == SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT || |
| 685 site_identity_status_ == | 677 site_identity_status_ == |
| 686 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MINOR || | 678 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM) { |
| 687 site_identity_status_ == | |
| 688 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MAJOR) { | |
| 689 tab_id = WebsiteSettingsUI::TAB_ID_CONNECTION; | 679 tab_id = WebsiteSettingsUI::TAB_ID_CONNECTION; |
| 690 RecordWebsiteSettingsAction( | 680 RecordWebsiteSettingsAction( |
| 691 WEBSITE_SETTINGS_CONNECTION_TAB_SHOWN_IMMEDIATELY); | 681 WEBSITE_SETTINGS_CONNECTION_TAB_SHOWN_IMMEDIATELY); |
| 692 } | 682 } |
| 693 | 683 |
| 694 ui_->SetSelectedTab(tab_id); | 684 ui_->SetSelectedTab(tab_id); |
| 695 } | 685 } |
| 696 | 686 |
| 697 void WebsiteSettings::PresentSitePermissions() { | 687 void WebsiteSettings::PresentSitePermissions() { |
| 698 PermissionInfoList permission_info_list; | 688 PermissionInfoList permission_info_list; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 info.connection_status = site_connection_status_; | 774 info.connection_status = site_connection_status_; |
| 785 info.connection_status_description = | 775 info.connection_status_description = |
| 786 UTF16ToUTF8(site_connection_details_); | 776 UTF16ToUTF8(site_connection_details_); |
| 787 info.identity_status = site_identity_status_; | 777 info.identity_status = site_identity_status_; |
| 788 info.identity_status_description = | 778 info.identity_status_description = |
| 789 UTF16ToUTF8(site_identity_details_); | 779 UTF16ToUTF8(site_identity_details_); |
| 790 info.certificate = certificate_; | 780 info.certificate = certificate_; |
| 791 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; | 781 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; |
| 792 ui_->SetIdentityInfo(info); | 782 ui_->SetIdentityInfo(info); |
| 793 } | 783 } |
| OLD | NEW |