Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4630)

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2220603003: Remove unnecessary |result| argument from AllowCertificateError() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android fix Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698