Don't pass the result through

It's meaningless on macOS, at least.
This commit is contained in:
joshaber 2017-04-04 09:21:15 -04:00
parent 0cab8a3322
commit 146e1ed3ce
3 changed files with 6 additions and 9 deletions

View file

@ -17,7 +17,7 @@ class NativeWindow;
namespace certificate_trust {
typedef base::Callback<void(bool result)> ShowTrustCallback;
typedef base::Callback<void(void)> ShowTrustCallback;
void ShowCertificateTrust(atom::NativeWindow* parent_window,
const scoped_refptr<net::X509Certificate>& cert,

View file

@ -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());
}
callback_.Run(returnCode == NSFileHandlingPanelOKButton ? true : false);
callback_.Run();
[self autorelease];
}

View file

@ -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.