diff --git a/atom/browser/ui/certificate_trust.h b/atom/browser/ui/certificate_trust.h index 085d04d1030a..7cbf31ea41fb 100644 --- a/atom/browser/ui/certificate_trust.h +++ b/atom/browser/ui/certificate_trust.h @@ -17,7 +17,7 @@ class NativeWindow; namespace certificate_trust { -typedef base::Callback ShowTrustCallback; +typedef base::Callback ShowTrustCallback; void ShowCertificateTrust(atom::NativeWindow* parent_window, const scoped_refptr& cert, diff --git a/atom/browser/ui/certificate_trust_mac.mm b/atom/browser/ui/certificate_trust_mac.mm index ad54eaa3831c..e0888dd3ea24 100644 --- a/atom/browser/ui/certificate_trust_mac.mm +++ b/atom/browser/ui/certificate_trust_mac.mm @@ -66,14 +66,12 @@ - (void)panelDidEnd:(NSWindow*)sheet returnCode:(int)returnCode contextInfo:(void*)contextInfo { - if (returnCode == NSFileHandlingPanelOKButton) { - auto cert_db = net::CertDatabase::GetInstance(); - // This forces Chromium to reload the certificate since it might be trusted - // now. - cert_db->NotifyObserversCertDBChanged(cert_.get()); - } + auto cert_db = net::CertDatabase::GetInstance(); + // This forces Chromium to reload the certificate since it might be trusted + // now. + cert_db->NotifyObserversCertDBChanged(cert_.get()); - callback_.Run(returnCode == NSFileHandlingPanelOKButton ? true : false); + callback_.Run(); [self autorelease]; } diff --git a/docs/api/dialog.md b/docs/api/dialog.md index 17aa7341bb57..58bbd050845a 100644 --- a/docs/api/dialog.md +++ b/docs/api/dialog.md @@ -182,7 +182,6 @@ and no GUI dialog will appear. * `certificate` [Certificate](structures/certificate.md) - The certificate to trust/import. * `message` String - The message to display to the user. * `callback` Function - * `result` Boolean - Whether the user chose to cancel or continue. Displays a modal dialog that shows a message and certificate information, and gives the user the option of trusting/importing the certificate.