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 1963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1974 ChromeContentBrowserClient::CreateQuotaPermissionContext() { | 1974 ChromeContentBrowserClient::CreateQuotaPermissionContext() { |
1975 return new ChromeQuotaPermissionContext(); | 1975 return new ChromeQuotaPermissionContext(); |
1976 } | 1976 } |
1977 | 1977 |
1978 void ChromeContentBrowserClient::AllowCertificateError( | 1978 void ChromeContentBrowserClient::AllowCertificateError( |
1979 int render_process_id, | 1979 int render_process_id, |
1980 int render_frame_id, | 1980 int render_frame_id, |
1981 int cert_error, | 1981 int cert_error, |
1982 const net::SSLInfo& ssl_info, | 1982 const net::SSLInfo& ssl_info, |
1983 const GURL& request_url, | 1983 const GURL& request_url, |
1984 ResourceType::Type resource_type, | 1984 ResourceType resource_type, |
1985 bool overridable, | 1985 bool overridable, |
1986 bool strict_enforcement, | 1986 bool strict_enforcement, |
1987 const base::Callback<void(bool)>& callback, | 1987 const base::Callback<void(bool)>& callback, |
1988 content::CertificateRequestResultType* result) { | 1988 content::CertificateRequestResultType* result) { |
1989 if (resource_type != ResourceType::MAIN_FRAME) { | 1989 if (resource_type != content::RESOURCE_TYPE_MAIN_FRAME) { |
1990 // A sub-resource has a certificate error. The user doesn't really | 1990 // A sub-resource has a certificate error. The user doesn't really |
1991 // have a context for making the right decision, so block the | 1991 // have a context for making the right decision, so block the |
1992 // request hard, without an info bar to allow showing the insecure | 1992 // request hard, without an info bar to allow showing the insecure |
1993 // content. | 1993 // content. |
1994 *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY; | 1994 *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY; |
1995 return; | 1995 return; |
1996 } | 1996 } |
1997 | 1997 |
1998 // If the tab is being prerendered, cancel the prerender and the request. | 1998 // If the tab is being prerendered, cancel the prerender and the request. |
1999 content::RenderFrameHost* render_frame_host = | 1999 content::RenderFrameHost* render_frame_host = |
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2952 switches::kDisableWebRtcEncryption, | 2952 switches::kDisableWebRtcEncryption, |
2953 }; | 2953 }; |
2954 to_command_line->CopySwitchesFrom(from_command_line, | 2954 to_command_line->CopySwitchesFrom(from_command_line, |
2955 kWebRtcDevSwitchNames, | 2955 kWebRtcDevSwitchNames, |
2956 arraysize(kWebRtcDevSwitchNames)); | 2956 arraysize(kWebRtcDevSwitchNames)); |
2957 } | 2957 } |
2958 } | 2958 } |
2959 #endif // defined(ENABLE_WEBRTC) | 2959 #endif // defined(ENABLE_WEBRTC) |
2960 | 2960 |
2961 } // namespace chrome | 2961 } // namespace chrome |
OLD | NEW |