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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1649 | 1649 |
1650 void ChromeContentBrowserClient::AllowCertificateError( | 1650 void ChromeContentBrowserClient::AllowCertificateError( |
1651 int render_process_id, | 1651 int render_process_id, |
1652 int render_frame_id, | 1652 int render_frame_id, |
1653 int cert_error, | 1653 int cert_error, |
1654 const net::SSLInfo& ssl_info, | 1654 const net::SSLInfo& ssl_info, |
1655 const GURL& request_url, | 1655 const GURL& request_url, |
1656 ResourceType resource_type, | 1656 ResourceType resource_type, |
1657 bool overridable, | 1657 bool overridable, |
1658 bool strict_enforcement, | 1658 bool strict_enforcement, |
| 1659 bool expired_previous_decision, |
1659 const base::Callback<void(bool)>& callback, | 1660 const base::Callback<void(bool)>& callback, |
1660 content::CertificateRequestResultType* result) { | 1661 content::CertificateRequestResultType* result) { |
1661 if (resource_type != content::RESOURCE_TYPE_MAIN_FRAME) { | 1662 if (resource_type != content::RESOURCE_TYPE_MAIN_FRAME) { |
1662 // A sub-resource has a certificate error. The user doesn't really | 1663 // A sub-resource has a certificate error. The user doesn't really |
1663 // have a context for making the right decision, so block the | 1664 // have a context for making the right decision, so block the |
1664 // request hard, without an info bar to allow showing the insecure | 1665 // request hard, without an info bar to allow showing the insecure |
1665 // content. | 1666 // content. |
1666 *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY; | 1667 *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY; |
1667 return; | 1668 return; |
1668 } | 1669 } |
(...skipping 17 matching lines...) Expand all Loading... |
1686 | 1687 |
1687 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 1688 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
1688 CaptivePortalTabHelper* captive_portal_tab_helper = | 1689 CaptivePortalTabHelper* captive_portal_tab_helper = |
1689 CaptivePortalTabHelper::FromWebContents(tab); | 1690 CaptivePortalTabHelper::FromWebContents(tab); |
1690 if (captive_portal_tab_helper) | 1691 if (captive_portal_tab_helper) |
1691 captive_portal_tab_helper->OnSSLCertError(ssl_info); | 1692 captive_portal_tab_helper->OnSSLCertError(ssl_info); |
1692 #endif | 1693 #endif |
1693 | 1694 |
1694 // Otherwise, display an SSL blocking page. The interstitial page takes | 1695 // Otherwise, display an SSL blocking page. The interstitial page takes |
1695 // ownership of ssl_blocking_page. | 1696 // ownership of ssl_blocking_page. |
1696 SSLBlockingPage* ssl_blocking_page = new SSLBlockingPage( | 1697 SSLBlockingPage* ssl_blocking_page = |
1697 tab, cert_error, ssl_info, request_url, overridable, | 1698 new SSLBlockingPage(tab, |
1698 strict_enforcement, callback); | 1699 cert_error, |
| 1700 ssl_info, |
| 1701 request_url, |
| 1702 overridable, |
| 1703 strict_enforcement, |
| 1704 expired_previous_decision, |
| 1705 callback); |
1699 ssl_blocking_page->Show(); | 1706 ssl_blocking_page->Show(); |
1700 } | 1707 } |
1701 | 1708 |
1702 void ChromeContentBrowserClient::SelectClientCertificate( | 1709 void ChromeContentBrowserClient::SelectClientCertificate( |
1703 int render_process_id, | 1710 int render_process_id, |
1704 int render_frame_id, | 1711 int render_frame_id, |
1705 const net::HttpNetworkSession* network_session, | 1712 const net::HttpNetworkSession* network_session, |
1706 net::SSLCertRequestInfo* cert_request_info, | 1713 net::SSLCertRequestInfo* cert_request_info, |
1707 const base::Callback<void(net::X509Certificate*)>& callback) { | 1714 const base::Callback<void(net::X509Certificate*)>& callback) { |
1708 content::RenderFrameHost* rfh = content::RenderFrameHost::FromID( | 1715 content::RenderFrameHost* rfh = content::RenderFrameHost::FromID( |
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2596 switches::kDisableWebRtcEncryption, | 2603 switches::kDisableWebRtcEncryption, |
2597 }; | 2604 }; |
2598 to_command_line->CopySwitchesFrom(from_command_line, | 2605 to_command_line->CopySwitchesFrom(from_command_line, |
2599 kWebRtcDevSwitchNames, | 2606 kWebRtcDevSwitchNames, |
2600 arraysize(kWebRtcDevSwitchNames)); | 2607 arraysize(kWebRtcDevSwitchNames)); |
2601 } | 2608 } |
2602 } | 2609 } |
2603 #endif // defined(ENABLE_WEBRTC) | 2610 #endif // defined(ENABLE_WEBRTC) |
2604 | 2611 |
2605 } // namespace chrome | 2612 } // namespace chrome |
OLD | NEW |