Chromium Code Reviews| 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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 658 } | 658 } |
| 659 } | 659 } |
| 660 | 660 |
| 661 // Check if a user decision has been made to allow or deny certificates with | 661 // Check if a user decision has been made to allow or deny certificates with |
| 662 // errors on this site. | 662 // errors on this site. |
| 663 ChromeSSLHostStateDelegate* delegate = | 663 ChromeSSLHostStateDelegate* delegate = |
| 664 ChromeSSLHostStateDelegateFactory::GetForProfile(profile_); | 664 ChromeSSLHostStateDelegateFactory::GetForProfile(profile_); |
| 665 DCHECK(delegate); | 665 DCHECK(delegate); |
| 666 // Only show an SSL decision revoke button if the user has chosen to bypass | 666 // Only show an SSL decision revoke button if the user has chosen to bypass |
| 667 // SSL host errors for this host in the past. | 667 // SSL host errors for this host in the past. |
| 668 show_ssl_decision_revoke_button_ = delegate->HasAllowException(url.host()); | 668 show_ssl_decision_revoke_button_ = delegate->HasAllowException(url.host());} |
|
msw
2016/11/29 18:26:03
nit: fix closing curly brace
lgarron
2016/12/16 05:46:59
Done.
| |
| 669 | |
| 670 // By default select the Permissions Tab that displays all the site | |
| 671 // permissions. In case of a connection error or an issue with the certificate | |
| 672 // presented by the website, select the Connection Tab to draw the user's | |
| 673 // attention to the issue. If the site does not provide a certificate because | |
| 674 // it was loaded over an unencrypted connection, don't select the Connection | |
| 675 // Tab. | |
| 676 WebsiteSettingsUI::TabId tab_id = WebsiteSettingsUI::TAB_ID_PERMISSIONS; | |
| 677 if (site_connection_status_ == SITE_CONNECTION_STATUS_ENCRYPTED_ERROR || | |
| 678 site_connection_status_ == | |
| 679 SITE_CONNECTION_STATUS_INSECURE_PASSIVE_SUBRESOURCE || | |
| 680 site_connection_status_ == | |
| 681 SITE_CONNECTION_STATUS_INSECURE_ACTIVE_SUBRESOURCE || | |
| 682 site_identity_status_ == SITE_IDENTITY_STATUS_ERROR || | |
| 683 site_identity_status_ == SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN || | |
| 684 site_identity_status_ == SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT || | |
| 685 site_identity_status_ == | |
| 686 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MINOR || | |
| 687 site_identity_status_ == | |
| 688 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MAJOR) { | |
| 689 tab_id = WebsiteSettingsUI::TAB_ID_CONNECTION; | |
| 690 RecordWebsiteSettingsAction( | |
| 691 WEBSITE_SETTINGS_CONNECTION_TAB_SHOWN_IMMEDIATELY); | |
| 692 } | |
| 693 | |
| 694 ui_->SetSelectedTab(tab_id); | |
| 695 } | |
| 696 | 669 |
| 697 void WebsiteSettings::PresentSitePermissions() { | 670 void WebsiteSettings::PresentSitePermissions() { |
| 698 PermissionInfoList permission_info_list; | 671 PermissionInfoList permission_info_list; |
| 699 ChosenObjectInfoList chosen_object_info_list; | 672 ChosenObjectInfoList chosen_object_info_list; |
| 700 | 673 |
| 701 WebsiteSettingsUI::PermissionInfo permission_info; | 674 WebsiteSettingsUI::PermissionInfo permission_info; |
| 702 for (size_t i = 0; i < arraysize(kPermissionType); ++i) { | 675 for (size_t i = 0; i < arraysize(kPermissionType); ++i) { |
| 703 permission_info.type = kPermissionType[i]; | 676 permission_info.type = kPermissionType[i]; |
| 704 | 677 |
| 705 if (!ShouldShowPermission(permission_info.type)) | 678 if (!ShouldShowPermission(permission_info.type)) |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 791 info.connection_status = site_connection_status_; | 764 info.connection_status = site_connection_status_; |
| 792 info.connection_status_description = | 765 info.connection_status_description = |
| 793 UTF16ToUTF8(site_connection_details_); | 766 UTF16ToUTF8(site_connection_details_); |
| 794 info.identity_status = site_identity_status_; | 767 info.identity_status = site_identity_status_; |
| 795 info.identity_status_description = | 768 info.identity_status_description = |
| 796 UTF16ToUTF8(site_identity_details_); | 769 UTF16ToUTF8(site_identity_details_); |
| 797 info.certificate = certificate_; | 770 info.certificate = certificate_; |
| 798 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; | 771 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; |
| 799 ui_->SetIdentityInfo(info); | 772 ui_->SetIdentityInfo(info); |
| 800 } | 773 } |
| OLD | NEW |