Chromium Code Reviews| Index: chrome/browser/chrome_content_browser_client.cc |
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
| index 4f0bf8e06a13e0812c4e0735fdfa0a73d1440560..a18ae3867f8e6a398c4b777e2abdb29034064bc0 100644 |
| --- a/chrome/browser/chrome_content_browser_client.cc |
| +++ b/chrome/browser/chrome_content_browser_client.cc |
| @@ -2037,15 +2037,17 @@ void ChromeContentBrowserClient::AllowCertificateError( |
| bool overridable, |
| bool strict_enforcement, |
| bool expired_previous_decision, |
| - const base::Callback<void(bool)>& callback, |
| - content::CertificateRequestResultType* result) { |
| + const base::Callback<void(content::CertificateRequestResultType)>& |
| + callback) { |
| DCHECK(web_contents); |
| if (resource_type != content::RESOURCE_TYPE_MAIN_FRAME) { |
| // A sub-resource has a certificate error. The user doesn't really |
| // have a context for making the right decision, so block the |
| // request hard, without an info bar to allow showing the insecure |
| // content. |
| - *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY; |
| + if (!callback.is_null()) { |
|
nasko
2016/08/08 18:32:03
nit: No need for {} in one-line if statements.
estark
2016/08/08 20:00:13
Done.
|
| + callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY); |
| + } |
| return; |
| } |
| @@ -2054,7 +2056,9 @@ void ChromeContentBrowserClient::AllowCertificateError( |
| prerender::PrerenderContents::FromWebContents(web_contents); |
| if (prerender_contents) { |
| prerender_contents->Destroy(prerender::FINAL_STATUS_SSL_ERROR); |
| - *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL; |
| + if (!callback.is_null()) { |
| + callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); |
| + } |
| return; |
| } |