| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 } | 566 } |
| 567 | 567 |
| 568 // Check if a user decision has been made to allow or deny certificates with | 568 // Check if a user decision has been made to allow or deny certificates with |
| 569 // errors on this site. | 569 // errors on this site. |
| 570 ChromeSSLHostStateDelegate* delegate = | 570 ChromeSSLHostStateDelegate* delegate = |
| 571 ChromeSSLHostStateDelegateFactory::GetForProfile(profile); | 571 ChromeSSLHostStateDelegateFactory::GetForProfile(profile); |
| 572 DCHECK(delegate); | 572 DCHECK(delegate); |
| 573 // Only show an SSL decision revoke button if both the user has chosen to | 573 // Only show an SSL decision revoke button if both the user has chosen to |
| 574 // bypass SSL host errors for this host in the past and the user is not using | 574 // bypass SSL host errors for this host in the past and the user is not using |
| 575 // the traditional "forget-at-session-restart" error decision memory. | 575 // the traditional "forget-at-session-restart" error decision memory. |
| 576 show_ssl_decision_revoke_button_ = delegate->HasUserDecision(url.host()) && | 576 show_ssl_decision_revoke_button_ = delegate->HasAllowed(url.host()) && |
| 577 InRememberCertificateErrorDecisionsGroup(); | 577 InRememberCertificateErrorDecisionsGroup(); |
| 578 | 578 |
| 579 // By default select the permissions tab that displays all the site | 579 // By default select the permissions tab that displays all the site |
| 580 // permissions. In case of a connection error or an issue with the | 580 // permissions. In case of a connection error or an issue with the |
| 581 // certificate presented by the website, select the connection tab to draw | 581 // certificate presented by the website, select the connection tab to draw |
| 582 // the user's attention to the issue. If the site does not provide a | 582 // the user's attention to the issue. If the site does not provide a |
| 583 // certificate because it was loaded over an unencrypted connection, don't | 583 // certificate because it was loaded over an unencrypted connection, don't |
| 584 // select the connection tab. | 584 // select the connection tab. |
| 585 WebsiteSettingsUI::TabId tab_id = WebsiteSettingsUI::TAB_ID_PERMISSIONS; | 585 WebsiteSettingsUI::TabId tab_id = WebsiteSettingsUI::TAB_ID_PERMISSIONS; |
| 586 if (site_connection_status_ == SITE_CONNECTION_STATUS_ENCRYPTED_ERROR || | 586 if (site_connection_status_ == SITE_CONNECTION_STATUS_ENCRYPTED_ERROR || |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 if (visited_before_today) { | 728 if (visited_before_today) { |
| 729 first_visit_text = l10n_util::GetStringFUTF16( | 729 first_visit_text = l10n_util::GetStringFUTF16( |
| 730 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY, | 730 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY, |
| 731 base::TimeFormatShortDate(first_visit)); | 731 base::TimeFormatShortDate(first_visit)); |
| 732 } else { | 732 } else { |
| 733 first_visit_text = l10n_util::GetStringUTF16( | 733 first_visit_text = l10n_util::GetStringUTF16( |
| 734 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY); | 734 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY); |
| 735 } | 735 } |
| 736 ui_->SetFirstVisit(first_visit_text); | 736 ui_->SetFirstVisit(first_visit_text); |
| 737 } | 737 } |
| OLD | NEW |