Errrrybody's a scoped_refptr now
This commit is contained in:
parent
deae70de4d
commit
16cc79354c
4 changed files with 7 additions and 6 deletions
|
@ -813,7 +813,7 @@ void App::OnCertificateManagerModelCreated(
|
|||
|
||||
#if defined(OS_MACOSX)
|
||||
void App::ShowCertificateTrust(atom::NativeWindow* parent_window,
|
||||
const net::X509Certificate& cert,
|
||||
const scoped_refptr<net::X509Certificate>& cert,
|
||||
std::string message,
|
||||
const ShowTrustCallback& callback,
|
||||
mate::Arguments* args) {
|
||||
|
@ -960,7 +960,7 @@ void App::BuildPrototype(
|
|||
base::Bind(&Browser::GetCurrentActivityType, browser))
|
||||
.SetMethod("setAboutPanelOptions",
|
||||
base::Bind(&Browser::SetAboutPanelOptions, browser))
|
||||
// .SetMethod("showCertificateTrust", &App::ShowCertificateTrust)
|
||||
.SetMethod("showCertificateTrust", &App::ShowCertificateTrust)
|
||||
#endif
|
||||
#if defined(OS_WIN)
|
||||
.SetMethod("setUserTasks", base::Bind(&Browser::SetUserTasks, browser))
|
||||
|
|
|
@ -156,7 +156,7 @@ class App : public AtomBrowserClient::Delegate,
|
|||
|
||||
#if defined(OS_MACOSX)
|
||||
void ShowCertificateTrust(atom::NativeWindow* parent_window,
|
||||
const net::X509Certificate& cert,
|
||||
const scoped_refptr<net::X509Certificate>& cert,
|
||||
std::string message,
|
||||
const ShowTrustCallback& callback,
|
||||
mate::Arguments* args);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <string>
|
||||
|
||||
#include "base/callback_forward.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
|
||||
namespace net {
|
||||
class X509Certificate;
|
||||
|
@ -22,7 +23,7 @@ namespace api {
|
|||
typedef base::Callback<void(bool result)> ShowTrustCallback;
|
||||
|
||||
void ShowCertificateTrustUI(atom::NativeWindow* parent_window,
|
||||
const net::X509Certificate& cert,
|
||||
const scoped_refptr<net::X509Certificate>& cert,
|
||||
std::string message,
|
||||
const ShowTrustCallback& callback);
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@ namespace atom {
|
|||
namespace api {
|
||||
|
||||
void ShowCertificateTrustUI(atom::NativeWindow* parent_window,
|
||||
const net::X509Certificate& cert,
|
||||
const scoped_refptr<net::X509Certificate>& cert,
|
||||
std::string message,
|
||||
const ShowTrustCallback& callback) {
|
||||
auto sec_policy = SecPolicyCreateBasicX509();
|
||||
SecTrustRef trust = nullptr;
|
||||
SecTrustCreateWithCertificates(cert.CreateOSCertChainForCert(), sec_policy, &trust);
|
||||
SecTrustCreateWithCertificates(cert->CreateOSCertChainForCert(), sec_policy, &trust);
|
||||
// CFRelease(sec_policy);
|
||||
|
||||
NSWindow* window = parent_window ?
|
||||
|
|
Loading…
Reference in a new issue